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

Unified Diff: cc/test/layer_test_common.h

Issue 1823833002: cc : Update render surfaces using LayerListIterator instead of treewalk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ASAN unittest crashes Created 4 years, 9 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 | « no previous file | cc/test/layer_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.h
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index af93e731adeec5ccf9af184a5e5f7eda0a7195c3..a1904b98db7ec2200f4a9444662f8daba40a9b29 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -61,7 +61,8 @@ class LayerTestCommon {
scoped_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
T* ptr = layer.get();
- root_layer_impl_->AddChild(std::move(layer));
+ LayerImpl* root_layer_impl = host_->active_tree()->root_layer();
+ root_layer_impl->AddChild(std::move(layer));
return ptr;
}
@@ -88,7 +89,8 @@ class LayerTestCommon {
scoped_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a);
T* ptr = layer.get();
- root_layer_impl_->AddChild(std::move(layer));
+ LayerImpl* root_layer_impl = host_->active_tree()->root_layer();
+ root_layer_impl->AddChild(std::move(layer));
return ptr;
}
@@ -97,7 +99,8 @@ class LayerTestCommon {
scoped_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b);
T* ptr = layer.get();
- root_layer_impl_->AddChild(std::move(layer));
+ LayerImpl* root_layer_impl = host_->active_tree()->root_layer();
+ root_layer_impl->AddChild(std::move(layer));
return ptr;
}
@@ -106,7 +109,8 @@ class LayerTestCommon {
scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
layer_impl_id_++, a, b, c, d);
T* ptr = layer.get();
- root_layer_impl_->AddChild(std::move(layer));
+ LayerImpl* root_layer_impl = host_->active_tree()->root_layer();
+ root_layer_impl->AddChild(std::move(layer));
return ptr;
}
@@ -124,7 +128,8 @@ class LayerTestCommon {
scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
layer_impl_id_++, a, b, c, d, e);
T* ptr = layer.get();
- root_layer_impl_->AddChild(std::move(layer));
+ LayerImpl* root_layer_impl = host_->active_tree()->root_layer();
+ root_layer_impl->AddChild(std::move(layer));
return ptr;
}
@@ -149,7 +154,9 @@ class LayerTestCommon {
ResourceProvider* resource_provider() const {
return host_->host_impl()->resource_provider();
}
- LayerImpl* root_layer() const { return root_layer_impl_.get(); }
+ LayerImpl* root_layer() const {
+ return host_->host_impl()->active_tree()->root_layer();
+ }
FakeLayerTreeHost* host() { return host_.get(); }
FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); }
TaskRunnerProvider* task_runner_provider() const {
@@ -164,7 +171,6 @@ class LayerTestCommon {
TestTaskGraphRunner task_graph_runner_;
scoped_ptr<OutputSurface> output_surface_;
scoped_ptr<FakeLayerTreeHost> host_;
- scoped_ptr<LayerImpl> root_layer_impl_;
scoped_ptr<RenderPass> render_pass_;
scoped_refptr<AnimationTimeline> timeline_;
scoped_refptr<AnimationTimeline> timeline_impl_;
« no previous file with comments | « no previous file | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698