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

Unified Diff: Source/core/paint/EmbeddedObjectPainter.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/EllipsisBoxPainter.cpp ('k') | Source/core/paint/FieldsetPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/EmbeddedObjectPainter.cpp
diff --git a/Source/core/paint/EmbeddedObjectPainter.cpp b/Source/core/paint/EmbeddedObjectPainter.cpp
index 86a3490c710e6ebfe16ce8c29566999145f7ac33..8dd5c5bc11ca175a8a1fe3f24088692756a54064 100644
--- a/Source/core/paint/EmbeddedObjectPainter.cpp
+++ b/Source/core/paint/EmbeddedObjectPainter.cpp
@@ -44,12 +44,12 @@ void EmbeddedObjectPainter::paintReplaced(const PaintInfo& paintInfo, const Layo
return;
GraphicsContext* context = paintInfo.context;
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, m_layoutEmbeddedObject, paintInfo.phase))
+ return;
+
FloatRect contentRect = m_layoutEmbeddedObject.contentBoxRect();
contentRect.moveBy(roundedIntPoint(paintOffset));
LayoutObjectDrawingRecorder drawingRecorder(*context, m_layoutEmbeddedObject, paintInfo.phase, contentRect);
- if (drawingRecorder.canUseCachedDrawing())
- return;
-
GraphicsContextStateSaver stateSaver(*context);
context->clip(contentRect);
« no previous file with comments | « Source/core/paint/EllipsisBoxPainter.cpp ('k') | Source/core/paint/FieldsetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698