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

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

Issue 1905673003: use new skia imagefilter-ctm handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp b/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
index c091c74e3a10b81a62848cc2db190bab3ec4b9d0..b09a59a43cb3e834a1510143befc4a0c559a3190 100644
--- a/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
@@ -14,8 +14,6 @@
#include "platform/graphics/paint/DrawingDisplayItem.h"
#include "platform/graphics/paint/PaintController.h"
-#define CHECK_CTM_FOR_TRANSFORMED_IMAGEFILTER
-
namespace blink {
GraphicsContext* SVGFilterRecordingContext::beginContent(FilterData* filterData)
@@ -74,25 +72,6 @@ static void paintFilteredContent(const LayoutObject& object, GraphicsContext& co
FilterEffect* lastEffect = filterData->filter->lastEffect();
context.clipRect(lastEffect->determineAbsolutePaintRect(lastEffect->maxEffectRect()));
-#ifdef CHECK_CTM_FOR_TRANSFORMED_IMAGEFILTER
- // TODO: Remove this workaround once skew/rotation support is added in Skia
- // (https://code.google.com/p/skia/issues/detail?id=3288, crbug.com/446935).
- // If the CTM contains rotation or shearing, apply the filter to
- // the unsheared/unrotated matrix, and do the shearing/rotation
- // as a final pass.
- AffineTransform ctm = SVGLayoutSupport::deprecatedCalculateTransformToLayer(&object);
- if (ctm.b() || ctm.c()) {
- AffineTransform scaleAndTranslate;
- scaleAndTranslate.translate(ctm.e(), ctm.f());
- scaleAndTranslate.scale(ctm.xScale(), ctm.yScale());
- ASSERT(scaleAndTranslate.isInvertible());
- AffineTransform shearAndRotate = scaleAndTranslate.inverse();
- shearAndRotate.multiply(ctm);
- context.concatCTM(shearAndRotate.inverse());
- imageFilter = SkiaImageFilterBuilder::buildTransform(shearAndRotate, std::move(imageFilter));
- }
-#endif
-
context.beginLayer(1, SkXfermode::kSrcOver_Mode, &boundaries, ColorFilterNone, std::move(imageFilter));
context.endLayer();
context.restore();

Powered by Google App Engine
This is Rietveld 408576698