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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

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/layout/compositing/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index ec4a6e8103e646a5e61042c7c445a03f1124a37f..11fc6426bced32e010ffda227793b5476dcd64f7 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -209,7 +209,7 @@ CompositedLayerMapping::~CompositedLayerMapping()
destroyGraphicsLayers();
}
-PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(CompositingReasons reasons)
+PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(CompositingReasons reasons, SquashingDisallowedReasons squashingDisallowedReasons)
{
GraphicsLayerFactory* graphicsLayerFactory = nullptr;
if (Page* page = layoutObject()->frame()->page())
@@ -218,6 +218,7 @@ PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin
OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, this);
graphicsLayer->setCompositingReasons(reasons);
+ graphicsLayer->setSquashingDisallowedReasons(squashingDisallowedReasons);
if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode())
graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode));
@@ -226,7 +227,7 @@ PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin
void CompositedLayerMapping::createPrimaryGraphicsLayer()
{
- m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons());
+ m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons(), m_owningLayer.squashingDisallowedReasons());
updateOpacity(layoutObject()->styleRef());
updateTransform(layoutObject()->styleRef());
@@ -346,6 +347,7 @@ void CompositedLayerMapping::updateCompositingReasons()
// All other layers owned by this mapping will have the same compositing reason
// for their lifetime, so they are initialized only when created.
m_graphicsLayer->setCompositingReasons(m_owningLayer.compositingReasons());
+ m_graphicsLayer->setSquashingDisallowedReasons(m_owningLayer.squashingDisallowedReasons());
}
bool CompositedLayerMapping::owningLayerClippedByLayerNotAboveCompositedAncestor(const PaintLayer* scrollParent)

Powered by Google App Engine
This is Rietveld 408576698