Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(872)

Unified Diff: Source/core/paint/SVGFilterPainter.cpp

Issue 1338753003: Specify the source rect on the SourceGraphic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Doh Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/svg/SVGLayoutTreeAsText.cpp ('k') | Source/core/svg/graphics/filters/SVGFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGFilterPainter.cpp
diff --git a/Source/core/paint/SVGFilterPainter.cpp b/Source/core/paint/SVGFilterPainter.cpp
index e774eab470889809e3ede50c52195b2a126fffde..8bc6efacd271d7ef99f71fd887042df5162b3c27 100644
--- a/Source/core/paint/SVGFilterPainter.cpp
+++ b/Source/core/paint/SVGFilterPainter.cpp
@@ -130,10 +130,11 @@ GraphicsContext* SVGFilterPainter::prepareEffect(LayoutObject& object, SVGFilter
return nullptr;
// Create the SVGFilter object.
- FloatRect drawingRegion = object.strokeBoundingBox();
- drawingRegion.intersect(filterRegion);
bool primitiveBoundingBoxMode = filterElement->primitiveUnits()->currentValue()->enumValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
- filterData->filter = SVGFilter::create(enclosingIntRect(drawingRegion), targetBoundingBox, filterRegion, primitiveBoundingBoxMode);
+ filterData->filter = SVGFilter::create(targetBoundingBox, filterRegion, primitiveBoundingBoxMode);
+
+ IntRect sourceRegion = enclosingIntRect(intersection(filterRegion, object.strokeBoundingBox()));
+ filterData->filter->sourceGraphic()->setSourceRect(sourceRegion);
// Create all relevant filter primitives.
filterData->builder = m_filter.buildPrimitives(filterData->filter.get());
« no previous file with comments | « Source/core/layout/svg/SVGLayoutTreeAsText.cpp ('k') | Source/core/svg/graphics/filters/SVGFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698