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

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

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 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/paint/SVGInlineTextBoxPainter.cpp ('k') | Source/core/paint/SVGRootInlineBoxPainter.cpp » ('j') | 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 3bde83583ec19977bac53bd8510fb0a0a6c31980..9aea7695f6b9e27dad2a32009fab970e3ba9a482 100644
--- a/Source/core/paint/SVGMaskPainter.cpp
+++ b/Source/core/paint/SVGMaskPainter.cpp
@@ -76,10 +76,10 @@ void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
AffineTransform contentTransformation;
RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(contentTransformation, targetBoundingBox, context);
- LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, targetPaintInvalidationRect);
- if (drawingRecorder.canUseCachedDrawing())
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layoutObject, DisplayItem::SVGMask))
return;
+ LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, targetPaintInvalidationRect);
context->save();
context->concatCTM(contentTransformation);
context->drawPicture(maskContentPicture.get());
« no previous file with comments | « Source/core/paint/SVGInlineTextBoxPainter.cpp ('k') | Source/core/paint/SVGRootInlineBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698