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

Unified Diff: cc/trees/layer_tree_host_unittest_video.cc

Issue 1895873008: cc : Replace LayerImpl::children calls with LayerById (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/layers/texture_layer_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_video.cc
diff --git a/cc/trees/layer_tree_host_unittest_video.cc b/cc/trees/layer_tree_host_unittest_video.cc
index 269ee8f69ef8b96c55a61931f2f5e07c34974c9c..24cbd363763f60bbb26148a5e9fe46870ebea37c 100644
--- a/cc/trees/layer_tree_host_unittest_video.cc
+++ b/cc/trees/layer_tree_host_unittest_video.cc
@@ -32,6 +32,7 @@ class LayerTreeHostVideoTestSetNeedsDisplay
video->SetBounds(gfx::Size(4, 5));
video->SetIsDrawable(true);
root->AddChild(video);
+ video_layer_id_ = video->id();
layer_tree_host()->SetRootLayer(root);
layer_tree_host()->SetDeviceScaleFactor(2.f);
@@ -69,7 +70,7 @@ class LayerTreeHostVideoTestSetNeedsDisplay
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
VideoLayerImpl* video = static_cast<VideoLayerImpl*>(
- host_impl->active_tree()->root_layer()->children()[0]);
+ host_impl->active_tree()->LayerById(video_layer_id_));
EXPECT_EQ(media::VIDEO_ROTATION_90, video->video_rotation());
@@ -83,6 +84,7 @@ class LayerTreeHostVideoTestSetNeedsDisplay
private:
int num_draws_;
+ int video_layer_id_;
FakeVideoFrameProvider video_frame_provider_;
};
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698