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

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

Issue 1730653002: Move squash preventing reasons out of compositing reasons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug and test fixes. Created 4 years, 10 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 3932a006ce92e9f3f11a1ed8cce432930cf27b5b..473f4583c086fff13d2dca5fc8ce5abccda588f6 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -57,6 +57,7 @@
#include "core/paint/PaintLayerStackingNode.h"
#include "core/paint/PaintLayerStackingNodeIterator.h"
#include "platform/graphics/CompositingReasons.h"
+#include "platform/graphics/SquashingDisallowedReasons.h"
#include "public/platform/WebBlendMode.h"
#include "wtf/Allocator.h"
#include "wtf/OwnPtr.h"
@@ -117,6 +118,10 @@ struct PaintLayerRareData {
// Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield.
CompositingReasons compositingReasons;
+ // This captures reasons why a paint layer might be forced to be separately
+ // composited rather than sharing a backing with another layer.
+ SquashingDisallowedReasons squashingDisallowedReasons;
+
// If the layer paints into its own backings, this keeps track of the backings.
// It's nullptr if the layer is not composited or paints into grouped backing.
OwnPtr<CompositedLayerMapping> compositedLayerMapping;
@@ -590,6 +595,9 @@ public:
CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompositingState()); return m_rareData ? m_rareData->compositingReasons : CompositingReasonNone; }
void setCompositingReasons(CompositingReasons, CompositingReasons mask = CompositingReasonAll);
+ SquashingDisallowedReasons squashingDisallowedReasons() const { ASSERT(isAllowedToQueryCompositingState()); return m_rareData ? m_rareData->squashingDisallowedReasons : SquashingDisallowedReasonsNone; }
+ void setSquashingDisallowedReasons(SquashingDisallowedReasons);
+
bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingState()); return m_hasCompositingDescendant; }
void setHasCompositingDescendant(bool);

Powered by Google App Engine
This is Rietveld 408576698