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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 1862313002: Update PaintLayer::needsPaintPhaseXXX flags when add/remove layer on style change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/core/paint/PaintLayer.h
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h
index 2a28fab1e5e6925ffe7f4d3a4fbeb02656f76888..a47fc7a4a63ce38dd3a642cf8605f0c9a4b13746 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -660,6 +660,7 @@ public:
// Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never had descendant outlines.
// Once it's set we never clear it because it's not easy to track if all outlines have been removed.
+ // For more details, see core/paint/REAME.md#Empty paint phase optimization.
bool needsPaintPhaseDescendantOutlines() const { return m_needsPaintPhaseDescendantOutlines; }
void setNeedsPaintPhaseDescendantOutlines() { ASSERT(isSelfPaintingLayer()); m_needsPaintPhaseDescendantOutlines = true; }
@@ -762,6 +763,13 @@ private:
return *m_rareData;
}
+ void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer)
+ {
+ m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendantOutlines;
+ m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat;
+ m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDescendantBlockBackgrounds;
+ }
+
unsigned m_layerType : 2; // PaintLayerType
// Self-painting layer is an optimization where we avoid the heavy Layer painting

Powered by Google App Engine
This is Rietveld 408576698