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..55f8ae884d159f53ff5a80b247b6943a4dcf3061 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,19 @@ void PaintArtifactCompositor::Update( |
| } |
| root_layer_->AddChild(layer); |
| + auto previous_host = layer->layer_tree_host(); |
|
pdr.
2017/05/16 02:46:35
What does it mean to change layer tree hosts? In m
wkorman
2017/05/16 21:42:42
It appears that the LayerTreeHost of a layer is up
|
| + if (previous_host) { |
| + previous_host->UnregisterElement(element_id, cc::ElementListType::ACTIVE, |
| + layer.get()); |
| + } |
| + auto host = root_layer_->layer_tree_host(); |
| + if (element_id) { |
| + host->RegisterElement(element_id, cc::ElementListType::ACTIVE, |
| + layer.get()); |
| + if (host->mutator_host()->HasAnyAnimation(element_id)) |
|
pdr.
2017/05/16 02:46:35
Do we set animations on the animation host yet?
wkorman
2017/05/16 21:42:42
If I understand your question correctly, given tha
|
| + host->SetNeedsCommit(); |
| + } |
| + |
| layer->set_property_tree_sequence_number(g_s_property_tree_sequence_number); |
| layer->SetTransformTreeIndex(transform_id); |
| layer->SetClipTreeIndex(clip_id); |