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

Side by Side Diff: cc/trees/layer_tree_host_unittest_video.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "cc/layers/render_surface_impl.h" 8 #include "cc/layers/render_surface_impl.h"
9 #include "cc/layers/video_layer.h" 9 #include "cc/layers/video_layer.h"
10 #include "cc/layers/video_layer_impl.h" 10 #include "cc/layers/video_layer_impl.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 EndTest(); 63 EndTest();
64 break; 64 break;
65 } 65 }
66 66
67 EXPECT_EQ(DRAW_SUCCESS, draw_result); 67 EXPECT_EQ(DRAW_SUCCESS, draw_result);
68 return draw_result; 68 return draw_result;
69 } 69 }
70 70
71 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { 71 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
72 VideoLayerImpl* video = static_cast<VideoLayerImpl*>( 72 VideoLayerImpl* video = static_cast<VideoLayerImpl*>(
73 host_impl->active_tree()->root_layer()->children()[0]); 73 host_impl->active_tree()->root_layer()->children()[0].get());
74 74
75 EXPECT_EQ(media::VIDEO_ROTATION_90, video->video_rotation()); 75 EXPECT_EQ(media::VIDEO_ROTATION_90, video->video_rotation());
76 76
77 if (num_draws_ == 0) 77 if (num_draws_ == 0)
78 video->SetNeedsRedraw(); 78 video->SetNeedsRedraw();
79 79
80 ++num_draws_; 80 ++num_draws_;
81 } 81 }
82 82
83 void AfterTest() override { EXPECT_EQ(2, num_draws_); } 83 void AfterTest() override { EXPECT_EQ(2, num_draws_); }
84 84
85 private: 85 private:
86 int num_draws_; 86 int num_draws_;
87 87
88 FakeVideoFrameProvider video_frame_provider_; 88 FakeVideoFrameProvider video_frame_provider_;
89 }; 89 };
90 90
91 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostVideoTestSetNeedsDisplay); 91 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostVideoTestSetNeedsDisplay);
92 92
93 } // namespace 93 } // namespace
94 } // namespace cc 94 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698