| 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 9d3e9d969695f6b7824dad2c82eaca3e0626c155..48a3d2811d7e3e89095c231cfff80bce6c403fed 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -65,6 +65,7 @@
|
| #include "platform/graphics/paint/CullRect.h"
|
| #include "platform/graphics/paint/PaintController.h"
|
| #include "platform/graphics/paint/TransformDisplayItem.h"
|
| +#include "public/platform/WebMutableProperties.h"
|
| #include "wtf/CurrentTime.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| @@ -538,6 +539,8 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
|
| if (layerConfigChanged || maskLayerChanged)
|
| updatePaintingPhases();
|
|
|
| + updateElementIdAndMutableProperties();
|
| +
|
| return layerConfigChanged;
|
| }
|
|
|
| @@ -725,6 +728,7 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry(const PaintLayer* compo
|
| updateContentsRect();
|
| updateBackgroundColor();
|
| updateDrawsContent();
|
| + updateElementIdAndMutableProperties();
|
| updateContentsOpaque();
|
| updateAfterPartResize();
|
| updateRenderingContext();
|
| @@ -1487,6 +1491,34 @@ void CompositedLayerMapping::updateShouldFlattenTransform()
|
| }
|
| }
|
|
|
| +void CompositedLayerMapping::updateElementIdAndMutableProperties()
|
| +{
|
| + if (!RuntimeEnabledFeatures::compositorWorkerEnabled())
|
| + return;
|
| +
|
| + TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositedLayerMapping::updateElementId()");
|
| +
|
| + uint64_t elementId = 0;
|
| + uint32_t mainMutableProperties = WebMutablePropertyNone;
|
| + uint32_t scrollMutableProperties = WebMutablePropertyNone;
|
| +
|
| + if (m_owningLayer.layoutObject()->style()->hasCompositorProxy()) {
|
| + if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) {
|
| + elementId = DOMNodeIds::idForNode(owningNode);
|
| + mainMutableProperties = WebMutablePropertyOpacity | WebMutablePropertyTransform;
|
| + scrollMutableProperties = WebMutablePropertyScrollLeft | WebMutablePropertyScrollTop;
|
| + }
|
| + }
|
| +
|
| + m_graphicsLayer->setElementId(elementId);
|
| + m_graphicsLayer->setMutableProperties(mainMutableProperties);
|
| +
|
| + if (m_scrollingContentsLayer.get()) {
|
| + m_scrollingContentsLayer->setElementId(elementId);
|
| + m_scrollingContentsLayer->setMutableProperties(scrollMutableProperties);
|
| + }
|
| +}
|
| +
|
| bool CompositedLayerMapping::updateForegroundLayer(bool needsForegroundLayer)
|
| {
|
| bool layerChanged = false;
|
|
|