Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / include / effects / SkTileImageFilter.h
index 390e00c..c26ae9a 100644 (file)
@@ -14,16 +14,20 @@ class SK_API SkTileImageFilter : public SkImageFilter {
     typedef SkImageFilter INHERITED;
 
 public:
-    /** Tile image filter constructor
+    /** Create a tile image filter
         @param srcRect  Defines the pixels to tile
         @param dstRect  Defines the pixels where tiles are drawn
         @param input    Input from which the subregion defined by srcRect will be tiled
     */
-    SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input)
-        : INHERITED(input), fSrcRect(srcRect), fDstRect(dstRect) {}
+    static SkTileImageFilter* Create(const SkRect& srcRect, const SkRect& dstRect,
+                                     SkImageFilter* input) {
+        return SkNEW_ARGS(SkTileImageFilter, (srcRect, dstRect, input));
+    }
 
-    virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm,
+    virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx,
                                SkBitmap* dst, SkIPoint* offset) const SK_OVERRIDE;
+    virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
+                                SkIRect* dst) const SK_OVERRIDE;
 
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter)
 
@@ -32,6 +36,12 @@ protected:
 
     virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
 
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+    SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input)
+        : INHERITED(input), fSrcRect(srcRect), fDstRect(dstRect) {}
+
 private:
     SkRect fSrcRect;
     SkRect fDstRect;