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

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

Issue 1584493002: Skip PaintPhaseDescendantOutlinesOnly if no descendent outlines in the layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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 32cc020fd20abaf3b4e3d411f0ef0fba49985db8..f379507c3846f712a6aefd0b651ce85292fcf380 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -621,6 +621,11 @@ public:
PaintLayerPainter::PaintResult previousPaintResult() const { return static_cast<PaintLayerPainter::PaintResult>(m_previousPaintResult); }
void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { m_previousPaintResult = static_cast<unsigned>(result); ASSERT(m_previousPaintResult == static_cast<unsigned>(result)); }
+ // 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.
+ bool needsPaintPhaseDescendantOutlines() const { return m_needsPaintPhaseDescendantOutlines; }
+ void setNeedsPaintPhaseDescendantOutlines() { ASSERT(isSelfPaintingLayer()); m_needsPaintPhaseDescendantOutlines = true; }
+
PaintTiming* paintTiming();
private:
@@ -753,6 +758,8 @@ private:
unsigned m_needsRepaint : 1;
unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult
+ unsigned m_needsPaintPhaseDescendantOutlines : 1;
+
LayoutBoxModelObject* m_layoutObject;
PaintLayer* m_parent;
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698