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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1909283004: cc: Remove LayerImpl::children() calls after tree synchronization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « cc/trees/layer_tree_host_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/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index a6facc6b8484cdc072c06e7cbd0156b81c0ac8c5..45a960f8d310e03da79011bcce89d936a8d019f5 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -3773,6 +3773,7 @@ class LayerTreeHostTestElasticOverscroll : public LayerTreeHostTest {
page_scale_layer->AddChild(inner_viewport_scroll_layer);
scoped_refptr<Layer> content_layer = FakePictureLayer::Create(&client_);
+ content_layer_id_ = content_layer->id();
content_layer->SetBounds(gfx::Size(10, 10));
inner_viewport_scroll_layer->AddChild(content_layer);
@@ -3795,7 +3796,7 @@ class LayerTreeHostTestElasticOverscroll : public LayerTreeHostTest {
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
num_draws_++;
LayerImpl* content_layer_impl =
- host_impl->active_tree()->InnerViewportScrollLayer()->children()[0];
+ host_impl->active_tree()->LayerById(content_layer_id_);
gfx::Transform expected_draw_transform;
switch (num_draws_) {
case 1:
@@ -3833,6 +3834,7 @@ class LayerTreeHostTestElasticOverscroll : public LayerTreeHostTest {
FakeContentLayerClient client_;
scoped_refptr<Layer> root_layer_;
ScrollElasticityHelper* scroll_elasticity_helper_;
+ int content_layer_id_;
int num_draws_;
};
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698