diff options
author | 2015-06-02 10:52:43 -0700 | |
---|---|---|
committer | 2015-06-02 10:52:43 -0700 | |
commit | 05be93bbdf09576f7903130e3b106b0a8c7c4b4e (patch) | |
tree | 1e94f845fda357453a25d6195d905fea1d13116c /include/effects/SkTileImageFilter.h | |
parent | 91284caa23274d2336884913bc7806745071bd72 (diff) |
Fix dst bound reported by SkTileImageFilter
In the example from the bug we had the filter DAG:
color filter (table)
0: xfermode filter (arith)
0: tile filter [0,80,34,114] -> [0,80,800,480]
0: color filter (table)
0: bitmap src 34x34 -> [0,80,34,114]
1: color filter (table)
0: picture filter [0, 80, 800, 480]
computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn.
This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit.
BUG=493783
Review URL: https://codereview.chromium.org/1152553006
Diffstat (limited to 'include/effects/SkTileImageFilter.h')
-rw-r--r-- | include/effects/SkTileImageFilter.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h index a010205121..4dccf852be 100644 --- a/include/effects/SkTileImageFilter.h +++ b/include/effects/SkTileImageFilter.h @@ -22,10 +22,11 @@ public: static SkTileImageFilter* Create(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input); - virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* dst, SkIPoint* offset) const override; - virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, - SkIRect* dst) const override; + bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx, + SkBitmap* dst, SkIPoint* offset) const override; + bool onFilterBounds(const SkIRect& src, const SkMatrix&, + SkIRect* dst) const override; + void computeFastBounds(const SkRect& src, SkRect* dst) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) |