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

Unified Diff: Source/core/paint/ListMarkerPainter.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/LayoutObjectDrawingRecorderTest.cpp ('k') | Source/core/paint/MultiColumnSetPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ListMarkerPainter.cpp
diff --git a/Source/core/paint/ListMarkerPainter.cpp b/Source/core/paint/ListMarkerPainter.cpp
index fec23e13ba627147c390c18420cf9061b1166dec..1d40795904fb48ec318f885ddcc82b983443ad33 100644
--- a/Source/core/paint/ListMarkerPainter.cpp
+++ b/Source/core/paint/ListMarkerPainter.cpp
@@ -25,6 +25,9 @@ void ListMarkerPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& pai
if (m_layoutListMarker.style()->visibility() != VISIBLE)
return;
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutListMarker, paintInfo.phase))
+ return;
+
LayoutPoint boxOrigin(paintOffset + m_layoutListMarker.location());
LayoutRect overflowRect(m_layoutListMarker.visualOverflowRect());
if (m_layoutListMarker.selectionState() != LayoutObject::SelectionNone)
@@ -36,8 +39,6 @@ void ListMarkerPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& pai
return;
LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutListMarker, paintInfo.phase, pixelSnappedOverflowRect);
- if (recorder.canUseCachedDrawing())
- return;
LayoutRect box(boxOrigin, m_layoutListMarker.size());
« no previous file with comments | « Source/core/paint/LayoutObjectDrawingRecorderTest.cpp ('k') | Source/core/paint/MultiColumnSetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698