From bd9c806a5784da8805fd2b90eec8d15ad1057b3f Mon Sep 17 00:00:00 2001 From: senorblanco Date: Fri, 8 Jan 2016 12:36:51 -0800 Subject: Image filters: fix srcRect computation for FETile. For FETile's srcRect, use the computed filter primitive subregion, rather than the filterRegion with effect bounds applied. This will allow some upcoming optimizations in Skia. BUG=569950 Review URL: https://codereview.chromium.org/1569983004 Cr-Commit-Position: refs/heads/master@{#368429} --- skia/config/SkUserConfig.h | 2 ++ third_party/WebKit/Source/platform/graphics/filters/FETile.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index f9dce78..28c2cea 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h @@ -262,6 +262,8 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, // mtklein's fiddling with Src / SrcOver. Will rebaseline these only once when done. #define SK_SUPPORT_LEGACY_X86_BLITS +#define SK_DISABLE_TILE_IMAGE_FILTER_OPTIMIZATION + // ===== End Chrome-specific definitions ===== #endif diff --git a/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp b/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp index 8de356e..f42ffe9 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp +++ b/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp @@ -46,7 +46,7 @@ FloatRect FETile::mapPaintRect(const FloatRect& rect, bool forward) PassRefPtr FETile::createImageFilter(SkiaImageFilterBuilder& builder) { RefPtr input(builder.build(inputEffect(0), operatingColorSpace())); - FloatRect srcRect = inputEffect(0)->applyEffectBoundaries(filter()->filterRegion()); + FloatRect srcRect = inputEffect(0)->filterPrimitiveSubregion(); FloatRect dstRect = applyEffectBoundaries(filter()->filterRegion()); return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get())); } -- cgit v1.1