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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 1425593007: Separate display item clients for negative and normal/positive z-order children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 5477d3a81f1966c9fc45e4b5aa0605a44b86e2ed..19e7b78bcd21df98320cd3c40e7caf0cfd83fd83 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -467,25 +467,20 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintChildren(unsigned childre
if (!child)
return result;
- DisplayItem::Type subsequenceType;
- if (childrenToVisit == NegativeZOrderChildren) {
- subsequenceType = DisplayItem::SubsequenceNegativeZOrder;
- } else {
- ASSERT(childrenToVisit == (NormalFlowChildren | PositiveZOrderChildren));
- subsequenceType = DisplayItem::SubsequenceNormalFlowAndPositiveZOrder;
- }
-
Optional<SubsequenceRecorder> subsequenceRecorder;
if (!paintingInfo.disableSubsequenceCache
&& !context->printing()
&& m_paintLayer.stackingNode()->isStackingContext()
&& !(paintingInfo.globalPaintFlags() & GlobalPaintFlattenCompositingLayers)
&& !(paintFlags & (PaintLayerPaintingReflection | PaintLayerPaintingRootBackgroundOnly | PaintLayerPaintingOverlayScrollbars))) {
+ ASSERT(childrenToVisit == NegativeZOrderChildren || childrenToVisit == (NormalFlowChildren | PositiveZOrderChildren));
+ DisplayItemClientWrapper displayItemClient(childrenToVisit == NegativeZOrderChildren ? m_paintLayer.displayItemClientForNegativeZOrderChildren() : m_paintLayer.displayItemClientForNormalAndPositiveZOrderChildren());
if (!m_paintLayer.needsRepaint()
&& paintingInfo.scrollOffsetAccumulation == m_paintLayer.previousScrollOffsetAccumulationForPainting()
- && SubsequenceRecorder::useCachedSubsequenceIfPossible(*context, m_paintLayer, subsequenceType))
+ && SubsequenceRecorder::useCachedSubsequenceIfPossible(*context, displayItemClient)) {
return result;
- subsequenceRecorder.emplace(*context, m_paintLayer, subsequenceType);
+ }
+ subsequenceRecorder.emplace(*context, displayItemClient);
}
IntSize scrollOffsetAccumulationForChildren = paintingInfo.scrollOffsetAccumulation;

Powered by Google App Engine
This is Rietveld 408576698