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

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

Issue 1153403003: Remove SVGFilterElement's filterRes* attributes and setFilterRes() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase + updated smallFonts.svg and textFeatures.svg Created 5 years, 7 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/frame/UseCounter.h ('k') | Source/core/svg/SVGAttributeNames.in » ('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 22df7d3eaf42a099991e18fb4ff96e4e223d6d3a..7a1d4d8c8be4fdc1c7f43c3e13ec626d54754c4a 100644
--- a/Source/core/paint/SVGFilterPainter.cpp
+++ b/Source/core/paint/SVGFilterPainter.cpp
@@ -80,21 +80,6 @@ static void paintFilteredContent(LayoutObject& object, GraphicsContext* context,
// Clip drawing of filtered image to the minimum required paint rect.
FilterEffect* lastEffect = filterData->builder->lastEffect();
context->clipRect(lastEffect->determineAbsolutePaintRect(lastEffect->maxEffectRect()));
- if (filterElement->hasAttribute(SVGNames::filterResAttr)) {
- // Get boundaries in device coords.
- // FIXME: See crbug.com/382491. Is the use of getCTM OK here, given it does not include device
- // zoom or High DPI adjustments?
- FloatSize size = context->getCTM().mapSize(boundaries.size());
- // Compute the scale amount required so that the resulting offscreen is exactly filterResX by filterResY pixels.
- float filterResScaleX = filterElement->filterResX()->currentValue()->value() / size.width();
- float filterResScaleY = filterElement->filterResY()->currentValue()->value() / size.height();
- // Scale the CTM so the primitive is drawn to filterRes.
- context->scale(filterResScaleX, filterResScaleY);
- // Create a resize filter with the inverse scale.
- AffineTransform resizeMatrix;
- resizeMatrix.scale(1 / filterResScaleX, 1 / filterResScaleY);
- imageFilter = builder.buildTransform(resizeMatrix, imageFilter.get());
- }
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_CTM
// TODO: Remove this workaround once skew/rotation support is added in Skia
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/core/svg/SVGAttributeNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698