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

Unified Diff: Source/core/paint/SVGClipPainter.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/ReplacedPainter.cpp ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGClipPainter.cpp
diff --git a/Source/core/paint/SVGClipPainter.cpp b/Source/core/paint/SVGClipPainter.cpp
index 30dcf4a0a54045e9383a205a4821b59eb4f63e7c..2ad91ba5e6cad7fd7fc54aed54877b3d0313aa6d 100644
--- a/Source/core/paint/SVGClipPainter.cpp
+++ b/Source/core/paint/SVGClipPainter.cpp
@@ -131,10 +131,10 @@ void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO
AffineTransform contentTransformation;
RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(contentTransformation, targetBoundingBox, context);
- LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGClip, targetPaintInvalidationRect);
- if (drawingRecorder.canUseCachedDrawing())
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layoutObject, DisplayItem::SVGClip))
return;
+ LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGClip, targetPaintInvalidationRect);
context->save();
context->concatCTM(contentTransformation);
context->drawPicture(clipContentPicture.get());
« no previous file with comments | « Source/core/paint/ReplacedPainter.cpp ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698