Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| index 612385a0f360279353a80562b430d51db769a035..bcc1702700290a9fffc787e6c0787b23f4c03aca 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| @@ -9,6 +9,7 @@ |
| #include "cc/layers/picture_layer.h" |
| #include "cc/paint/display_item_list.h" |
| #include "cc/trees/layer_tree_host.h" |
| +#include "cc/trees/mutator_host_client.h" |
| #include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/graphics/GraphicsContext.h" |
| #include "platform/graphics/compositing/PaintChunksToCcLayer.h" |
| @@ -656,6 +657,18 @@ void PaintArtifactCompositor::Update( |
| } |
| root_layer_->AddChild(layer); |
| + if (auto previous_host = layer->layer_tree_host()) { |
| + previous_host->UnregisterElement(element_id, cc::ElementListType::ACTIVE, |
| + layer.get()); |
| + } |
| + if (element_id) { |
| + auto host = root_layer_->layer_tree_host(); |
| + host->RegisterElement(element_id, cc::ElementListType::ACTIVE, |
| + layer.get()); |
| + if (host->mutator_host()->HasAnyAnimation(element_id)) |
|
wkorman
2017/05/17 20:07:50
Believe we actually don't need to do this in SPv2,
|
| + host->SetNeedsCommit(); |
| + } |
| + |
| layer->set_property_tree_sequence_number(g_s_property_tree_sequence_number); |
| layer->SetTransformTreeIndex(transform_id); |
| layer->SetClipTreeIndex(clip_id); |