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

Unified Diff: Source/core/paint/ViewPainter.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/VideoPainter.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ViewPainter.cpp
diff --git a/Source/core/paint/ViewPainter.cpp b/Source/core/paint/ViewPainter.cpp
index 386840cec65e8f2add2ccd7594c101b255c9cf17..8a8d984735e9a43a38b20ac9854b90ff23e00631 100644
--- a/Source/core/paint/ViewPainter.cpp
+++ b/Source/core/paint/ViewPainter.cpp
@@ -49,6 +49,9 @@ void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo)
// culling and pre-blending optimization when possible.
GraphicsContext& context = *paintInfo.context;
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, m_layoutView, DisplayItem::BoxDecorationBackground))
+ return;
+
IntRect documentRect = m_layoutView.unscaledDocumentRect();
const Document& document = m_layoutView.document();
const FrameView& frameView = *m_layoutView.frameView();
@@ -60,8 +63,6 @@ void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo)
const LayoutObject* rootObject = document.documentElement() ? document.documentElement()->layoutObject() : nullptr;
LayoutObjectDrawingRecorder recorder(context, m_layoutView, DisplayItem::BoxDecorationBackground, documentRect);
- if (recorder.canUseCachedDrawing())
- return;
// Special handling for print economy mode.
bool forceBackgroundToWhite = BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(m_layoutView.styleRef(), document);
« no previous file with comments | « Source/core/paint/VideoPainter.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698