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

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

Issue 2888483002: Manage registering composited elements in PaintArtifactCompositor. (Closed)
Patch Set: Fix inverted logic. 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
« no previous file with comments | « 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..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);
« no previous file with comments | « cc/layers/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698