| 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 6f4504d80cd878bd6f533efdfa1ae2dc47b306db..28b712bf89e6f369752f837650aac7f03823c6ad 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -556,7 +556,8 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
|
| if (layerConfigChanged || maskLayerChanged)
|
| updatePaintingPhases();
|
|
|
| - updateElementIdAndCompositorMutableProperties();
|
| + updateCompositorElementId();
|
| + updateCompositorMutableProperties();
|
|
|
| return layerConfigChanged;
|
| }
|
| @@ -742,7 +743,8 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry(const PaintLayer* compo
|
| updateContentsRect();
|
| updateBackgroundColor();
|
| updateDrawsContent();
|
| - updateElementIdAndCompositorMutableProperties();
|
| + updateCompositorElementId();
|
| + updateCompositorMutableProperties();
|
| updateContentsOpaque();
|
| updateAfterPartResize();
|
| updateRenderingContext();
|
| @@ -1496,14 +1498,26 @@ void CompositedLayerMapping::updateShouldFlattenTransform()
|
| }
|
| }
|
|
|
| -void CompositedLayerMapping::updateElementIdAndCompositorMutableProperties()
|
| +void CompositedLayerMapping::updateCompositorElementId()
|
| +{
|
| + if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) {
|
| + if (owningNode->isElementNode()) {
|
| + Element* owningElement = toElement(owningNode);
|
| + CompositorElementId elementId = owningElement->compositorElementId();
|
| + m_graphicsLayer->setElementId(elementId);
|
| + if (m_scrollingContentsLayer.get())
|
| + m_scrollingContentsLayer->setElementId(elementId);
|
| + }
|
| + }
|
| +}
|
| +
|
| +void CompositedLayerMapping::updateCompositorMutableProperties()
|
| {
|
| if (!RuntimeEnabledFeatures::compositorWorkerEnabled())
|
| return;
|
|
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositedLayerMapping::updateElementId()");
|
|
|
| - CompositorElementId elementId = 0;
|
| uint32_t mainMutableProperties = CompositorMutableProperty::kNone;
|
| uint32_t scrollMutableProperties = CompositorMutableProperty::kNone;
|
|
|
| @@ -1512,7 +1526,6 @@ void CompositedLayerMapping::updateElementIdAndCompositorMutableProperties()
|
| if (owningNode->isElementNode()) {
|
| Element* owningElement = toElement(owningNode);
|
| uint32_t compositorMutableProperties = owningElement->compositorMutableProperties();
|
| - elementId = owningElement->compositorElementId();
|
| CompositorIdToElementMap::registerElement(*owningElement);
|
| mainMutableProperties = (CompositorMutableProperty::kOpacity | CompositorMutableProperty::kTransform) & compositorMutableProperties;
|
| scrollMutableProperties = (CompositorMutableProperty::kScrollLeft | CompositorMutableProperty::kScrollTop) & compositorMutableProperties;
|
| @@ -1520,13 +1533,9 @@ void CompositedLayerMapping::updateElementIdAndCompositorMutableProperties()
|
| }
|
| }
|
|
|
| - m_graphicsLayer->setElementId(elementId);
|
| m_graphicsLayer->setCompositorMutableProperties(mainMutableProperties);
|
| -
|
| - if (m_scrollingContentsLayer.get()) {
|
| - m_scrollingContentsLayer->setElementId(elementId);
|
| + if (m_scrollingContentsLayer.get())
|
| m_scrollingContentsLayer->setCompositorMutableProperties(scrollMutableProperties);
|
| - }
|
| }
|
|
|
| bool CompositedLayerMapping::updateForegroundLayer(bool needsForegroundLayer)
|
|
|