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

Unified Diff: cc/trees/occlusion_tracker_unittest.cc

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 | « cc/trees/layer_tree_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker_unittest.cc
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 5bfd312007755c13b71b2980a2ce4afdc05c65b5..5aa72c39f300f704acc2d4b13896f92699205057 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -105,8 +105,7 @@ class OcclusionTrackerTest : public testing::Test {
TestContentLayerImpl* layer_ptr = layer.get();
SetProperties(layer_ptr, transform, position, bounds);
- DCHECK(!root_.get());
- root_ = std::move(layer);
+ host_->host_impl()->active_tree()->SetRootLayer(std::move(layer));
layer_ptr->SetForceRenderSurface(true);
SetRootLayerOnMainThread(layer_ptr);
@@ -196,7 +195,7 @@ class OcclusionTrackerTest : public testing::Test {
}
void DestroyLayers() {
- root_ = nullptr;
+ host_->host_impl()->active_tree()->SetRootLayer(nullptr);
render_surface_layer_list_impl_.clear();
replica_layers_.clear();
mask_layers_.clear();
@@ -219,7 +218,7 @@ class OcclusionTrackerTest : public testing::Test {
}
void CalcDrawEtc(TestContentLayerImpl* root) {
- DCHECK(root == root_.get());
+ DCHECK(root == root->layer_tree_impl()->root_layer());
// These occlusion tests attach and detach layers in multiple
// iterations, so rebuild property trees every time.
@@ -311,7 +310,6 @@ class OcclusionTrackerTest : public testing::Test {
TestTaskGraphRunner task_graph_runner_;
scoped_ptr<FakeLayerTreeHost> host_;
// These hold ownership of the layers for the duration of the test.
- scoped_ptr<LayerImpl> root_;
LayerImplList render_surface_layer_list_impl_;
LayerIterator layer_iterator_begin_;
LayerIterator layer_iterator_;
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698