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

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

Issue 1184633004: Fix masking cull rects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGMaskPainter.cpp
diff --git a/Source/core/paint/SVGMaskPainter.cpp b/Source/core/paint/SVGMaskPainter.cpp
index d1c326f1571c434d4f592f285ca049d17f201bc1..0e020337927d501bcf5adeb29464412b2efa2905 100644
--- a/Source/core/paint/SVGMaskPainter.cpp
+++ b/Source/core/paint/SVGMaskPainter.cpp
@@ -9,10 +9,8 @@
#include "core/paint/CompositingRecorder.h"
#include "core/paint/LayoutObjectDrawingRecorder.h"
#include "core/paint/PaintInfo.h"
-#include "core/paint/TransformRecorder.h"
#include "platform/graphics/paint/CompositingDisplayItem.h"
#include "platform/graphics/paint/DisplayItemList.h"
-#include "platform/graphics/paint/DrawingDisplayItem.h"
namespace blink {
@@ -73,11 +71,13 @@ void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
AffineTransform contentTransformation;
RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(contentTransformation, targetBoundingBox);
- TransformRecorder recorder(*context, layoutObject, contentTransformation);
-
- LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, LayoutRect::infiniteIntRect());
chrishtr 2015/06/12 16:03:03 Curious: why did the infinite rect not work?
- if (!drawingRecorder.canUseCachedDrawing())
+ LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, targetBoundingBox);
fs 2015/06/12 08:12:31 targetBoundingBox could be too tight - maybe expos
+ if (!drawingRecorder.canUseCachedDrawing()) {
fs 2015/06/12 08:12:31 Early out?
+ context->save();
+ context->concatCTM(contentTransformation);
context->drawPicture(maskContentPicture.get());
+ context->restore();
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698