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

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

Issue 2545683002: Move all descendant-dependent flags into the same tree walk. (Closed)
Patch Set: none Created 4 years 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 5edb47be61c4e7f7a70486a9340cf4746749f7b6..d464858f8663abf3f6eab6f0f4beb8d98968d1be 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -684,11 +684,7 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
return m_childNeedsCompositingInputsUpdate;
}
bool needsCompositingInputsUpdate() const {
- // While we're updating the compositing inputs, these values may differ.
- // We should never be asking for this value when that is the case.
- DCHECK(m_needsDescendantDependentCompositingInputsUpdate ==
- m_needsAncestorDependentCompositingInputsUpdate);
- return m_needsDescendantDependentCompositingInputsUpdate;
+ return m_needsAncestorDependentCompositingInputsUpdate;
}
void updateAncestorOverflowLayer(const PaintLayer* ancestorOverflowLayer) {
@@ -765,13 +761,21 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
return m_hasAncestorWithClipPath;
}
bool hasDescendantWithClipPath() const {
- DCHECK(!m_needsDescendantDependentCompositingInputsUpdate);
+ DCHECK(!m_needsDescendantDependentFlagsUpdate);
return m_hasDescendantWithClipPath;
}
+
+ // Returns true if there is a descendant with blend-mode that is
+ // not contained within another enclosing stacking context other
+ // than the stacking context blend-mode creates, or the stacking
+ // context this PaintLayer might create. This is needed because
+ // blend-mode content needs to blend with the containing stacking
+ // context's painted output, but not the content in any grandparent
+ // stacking contexts.
bool hasNonIsolatedDescendantWithBlendMode() const;
bool hasRootScrollerAsDescendant() const {
- DCHECK(!m_needsDescendantDependentCompositingInputsUpdate);
+ DCHECK(!m_needsDescendantDependentFlagsUpdate);
return m_hasRootScrollerAsDescendant;
}
@@ -976,6 +980,8 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
#endif
private:
+ void setNeedsCompositingInputsUpdateInternal();
+
// Bounding box in the coordinates of this layer.
LayoutRect logicalBoundingBox() const;
@@ -1144,7 +1150,6 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
unsigned m_containsDirtyOverlayScrollbars : 1;
unsigned m_needsAncestorDependentCompositingInputsUpdate : 1;
- unsigned m_needsDescendantDependentCompositingInputsUpdate : 1;
unsigned m_childNeedsCompositingInputsUpdate : 1;
// Used only while determining what layers should be composited. Applies to

Powered by Google App Engine
This is Rietveld 408576698