summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsenorblanco <senorblanco@chromium.org>2016-01-08 12:36:51 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-08 20:37:35 +0000
commitbd9c806a5784da8805fd2b90eec8d15ad1057b3f (patch)
tree6a8e720c99196e4c10d9291029d11c5e98358f1e
parent3281140516d2332d4c0b7d4f614f262ffd7b8e82 (diff)
downloadchromium_src-bd9c806a5784da8805fd2b90eec8d15ad1057b3f.zip
chromium_src-bd9c806a5784da8805fd2b90eec8d15ad1057b3f.tar.gz
chromium_src-bd9c806a5784da8805fd2b90eec8d15ad1057b3f.tar.bz2
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}
-rw-r--r--skia/config/SkUserConfig.h2
-rw-r--r--third_party/WebKit/Source/platform/graphics/filters/FETile.cpp2
2 files changed, 3 insertions, 1 deletions
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<SkImageFilter> FETile::createImageFilter(SkiaImageFilterBuilder& builder)
{
RefPtr<SkImageFilter> 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()));
}