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

Unified Diff: cc/test/layer_test_common.h

Issue 1944623002: CC Animation: Use ElementId to attach CC animation players. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasedomids
Patch Set: Created 4 years, 8 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
Index: cc/test/layer_test_common.h
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index 7c1a60085f2e0d27f7521c067de2fb28813e8d79..72d89ca551fdee7f41ce87703329bb2f87aa82c6 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -60,6 +60,7 @@ class LayerTestCommon {
T* AddChildToRoot() {
std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;
@@ -69,6 +70,7 @@ class LayerTestCommon {
T* AddChild(LayerImpl* parent) {
std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
parent->AddChild(std::move(layer));
return ptr;
@@ -78,6 +80,7 @@ class LayerTestCommon {
T* AddReplicaLayer(LayerImpl* origin) {
std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
origin->SetReplicaLayer(std::move(layer));
return ptr;
@@ -87,6 +90,7 @@ class LayerTestCommon {
T* AddChildToRoot(const A& a) {
std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;
@@ -96,6 +100,7 @@ class LayerTestCommon {
T* AddChildToRoot(const A& a, const B& b) {
std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;
@@ -105,6 +110,7 @@ class LayerTestCommon {
T* AddChildToRoot(const A& a, const B& b, const C& c, const D& d) {
std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
layer_impl_id_++, a, b, c, d);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;
@@ -123,6 +129,7 @@ class LayerTestCommon {
const E& e) {
std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
layer_impl_id_++, a, b, c, d, e);
+ layer->SetElementId(NextElementId());
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;

Powered by Google App Engine
This is Rietveld 408576698