Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2888483002: Manage registering composited elements in PaintArtifactCompositor. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/layers/layer.cc ('K') | « cc/layers/layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« cc/layers/layer.cc ('K') | « cc/layers/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698