diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/graphics/graphics_layer.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/graphics/graphics_layer.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.cc b/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.cc index 48cf52efb0f..e4a7c0c96d1 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.cc +++ b/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.cc @@ -1058,16 +1058,23 @@ void GraphicsLayer::SetLayerState(const PropertyTreeState& layer_state, SetPaintArtifactCompositorNeedsUpdate(); } -void GraphicsLayer::SetContentsPropertyTreeState( - const PropertyTreeState& layer_state) { +void GraphicsLayer::SetContentsLayerState(const PropertyTreeState& layer_state, + const IntPoint& layer_offset) { DCHECK(ContentsLayer()); - if (contents_property_tree_state_) { - *contents_property_tree_state_ = layer_state; + if (contents_layer_state_) { + if (contents_layer_state_->state == layer_state && + contents_layer_state_->offset == layer_offset) + return; + contents_layer_state_->state = layer_state; + contents_layer_state_->offset = layer_offset; } else { - contents_property_tree_state_ = - std::make_unique<PropertyTreeState>(layer_state); + contents_layer_state_ = + std::make_unique<LayerState>(LayerState{layer_state, layer_offset}); } + + if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) + SetPaintArtifactCompositorNeedsUpdate(); } scoped_refptr<cc::DisplayItemList> GraphicsLayer::PaintContentsToDisplayList( |