Index: Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
index bd2019d089d1db590b3571e6d0ee2b95962bc235..39de4baa53a1e6beecf7f244383ec4d15d1e4b6e 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp |
@@ -150,16 +150,17 @@ static void beginDeferredFilter(GraphicsContext* context, FilterData* filterData |
context->clipRect(boundaries); |
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. |
- FloatSize filterResScale( |
- filterElement->filterResX()->currentValue()->value() / size.width(), |
- filterElement->filterResY()->currentValue()->value() / size.height()); |
+ 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(filterResScale); |
+ context->scale(filterResScaleX, filterResScaleY); |
// Create a resize filter with the inverse scale. |
AffineTransform resizeMatrix; |
- resizeMatrix.scale(1 / filterResScale.width(), 1 / filterResScale.height()); |
+ resizeMatrix.scale(1 / filterResScaleX, 1 / filterResScaleY); |
imageFilter = builder.buildTransform(resizeMatrix, imageFilter.get()); |
} |
// If the CTM contains rotation or shearing, apply the filter to |