Home | History | Annotate | Download | only in compositor_bindings
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_
      6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_
      7 
      8 #include "cc/output/filter_operations.h"
      9 #include "third_party/WebKit/public/platform/WebFilterOperations.h"
     10 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h"
     11 
     12 namespace webkit {
     13 
     14 class WebFilterOperationsImpl : public blink::WebFilterOperations {
     15  public:
     16   WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebFilterOperationsImpl();
     17   virtual ~WebFilterOperationsImpl();
     18 
     19   const cc::FilterOperations& AsFilterOperations() const;
     20 
     21   // Implementation of blink::WebFilterOperations methods
     22   virtual void appendGrayscaleFilter(float amount);
     23   virtual void appendSepiaFilter(float amount);
     24   virtual void appendSaturateFilter(float amount);
     25   virtual void appendHueRotateFilter(float amount);
     26   virtual void appendInvertFilter(float amount);
     27   virtual void appendBrightnessFilter(float amount);
     28   virtual void appendContrastFilter(float amount);
     29   virtual void appendOpacityFilter(float amount);
     30   virtual void appendBlurFilter(float amount);
     31   virtual void appendDropShadowFilter(blink::WebPoint offset,
     32                                       float std_deviation,
     33                                       blink::WebColor color);
     34   virtual void appendColorMatrixFilter(SkScalar matrix[20]);
     35   virtual void appendZoomFilter(float amount, int inset);
     36   virtual void appendSaturatingBrightnessFilter(float amount);
     37   virtual void appendReferenceFilter(SkImageFilter* image_filter);
     38 
     39   virtual void clear();
     40 
     41  private:
     42   cc::FilterOperations filter_operations_;
     43 
     44   DISALLOW_COPY_AND_ASSIGN(WebFilterOperationsImpl);
     45 };
     46 
     47 }  // namespace webkit
     48 
     49 #endif  // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_
     50