From c3176aa5e578cc64a2534a9ddac2fec5ab6d8d77 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Tue, 16 Jun 2015 09:44:56 -0700 Subject: 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 Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4e Committed: https://skia.googlesource.com/skia/+/0be685755f942baea26c66a87226b569fc17e960 Review URL: https://codereview.chromium.org/1152553006 --- include/effects/SkTileImageFilter.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/effects/SkTileImageFilter.h') diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h index f695355675..4dccf852be 100644 --- a/include/effects/SkTileImageFilter.h +++ b/include/effects/SkTileImageFilter.h @@ -26,6 +26,7 @@ public: 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) -- cgit v1.2.3