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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 1905713002: cc: Remove LayerImpl::children() calls from descendants of LayerTreeTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comments 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_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index ae08b6d111851f2df4107eb9c4fbc8026a9f5fb4..15ef05e0d6b3b41a35062a8e749b44d6fe777a8f 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -646,7 +646,7 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
FakePictureLayerImpl* picture_impl = static_cast<FakePictureLayerImpl*>(
- host_impl->active_tree()->root_layer()->children()[0]);
+ host_impl->active_tree()->LayerById(layer_->id()));
EXPECT_TRUE(picture_impl->HighResTiling()
->TileAt(0, 0)
->draw_info()
@@ -856,10 +856,10 @@ class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest {
root_picture = static_cast<FakePictureLayerImpl*>(
host_impl->active_tree()->root_layer());
- child_picture =
- static_cast<FakePictureLayerImpl*>(root_picture->children()[0]);
- grandchild_picture =
- static_cast<FakePictureLayerImpl*>(child_picture->children()[0]);
+ child_picture = static_cast<FakePictureLayerImpl*>(
+ host_impl->active_tree()->LayerById(child_->id()));
+ grandchild_picture = static_cast<FakePictureLayerImpl*>(
+ host_impl->active_tree()->LayerById(grandchild_->id()));
++num_commits_;
switch (num_commits_) {
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698