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

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

Issue 1195513004: Change DontCheck under-invalidation checking mode to CacheSkipper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix bug Created 5 years, 6 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 | « no previous file | Source/core/paint/LayoutObjectDrawingRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index aed5b1c83f8f3e65c98872a763bda27afbafc9db..160934f6c864c0aa4a631263a67ee4fc20b294f3 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -78,19 +78,19 @@ bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance)
void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const LayoutRect& paintRect)
{
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBox, DisplayItem::BoxDecorationBackground, boundsForDrawingRecorder(paintOffset));
- if (recorder.canUseCachedDrawing())
- return;
-
const ComputedStyle& style = m_layoutBox.styleRef();
- BoxDecorationData boxDecorationData(m_layoutBox);
-#if ENABLE(ASSERT)
// FIXME: For now we don't have notification on media buffered range change from media player
// and miss paint invalidation on buffered range change. crbug.com/484288.
+ Optional<DisplayItemCacheSkipper> cacheSkipper;
if (style.appearance() == MediaSliderPart)
- recorder.setUnderInvalidationCheckingMode(DrawingDisplayItem::DontCheck);
-#endif
+ cacheSkipper.emplace(*paintInfo.context);
+
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBox, DisplayItem::BoxDecorationBackground, boundsForDrawingRecorder(paintOffset));
+ if (recorder.canUseCachedDrawing())
+ return;
+
+ BoxDecorationData boxDecorationData(m_layoutBox);
// FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have
// custom shadows of their own.
« no previous file with comments | « no previous file | Source/core/paint/LayoutObjectDrawingRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698