aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkTileImageFilter.h
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-29 15:20:39 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-29 15:20:39 +0000
commit0a5c233e3b911232c0d6f9a88ded99ecf88b8a97 (patch)
tree54bc91597d65bb936d65f595555f7677dd1cd597 /include/effects/SkTileImageFilter.h
parentdaaafa6e81860e3dc52660ba019c336f0a43f1e7 (diff)
Implement bounds traversals for tile and matrix convolution filters.
Add a new GM that exercises tiled drawing all pixel-moving filters (and some non-pixel-moving ones) and compares it against non-tiled drawing of the same filters. Fixing this test revealed that tile and matrix convolution filters had no onFilterBounds() traversals (test-driven development FTW). Tile requires (conservatively) the bounds to include the whole source rect, since it may end up in the result. Matrix convolution requires the bounds to be offset by the kernel size and target. R=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/258243005 git-svn-id: http://skia.googlecode.com/svn/trunk@14432 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects/SkTileImageFilter.h')
-rw-r--r--include/effects/SkTileImageFilter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h
index 6c0fa68f3c..c26ae9aef8 100644
--- a/include/effects/SkTileImageFilter.h
+++ b/include/effects/SkTileImageFilter.h
@@ -26,6 +26,8 @@ public:
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)