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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. 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 unified diff | Download patch
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 "cc/layers/render_surface_impl.h" 7 #include "cc/layers/render_surface_impl.h"
8 #include "cc/layers/video_layer.h" 8 #include "cc/layers/video_layer.h"
9 #include "cc/layers/video_layer_impl.h" 9 #include "cc/layers/video_layer_impl.h"
10 #include "cc/test/fake_video_frame_provider.h" 10 #include "cc/test/fake_video_frame_provider.h"
11 #include "cc/test/layer_tree_test.h" 11 #include "cc/test/layer_tree_test.h"
12 #include "cc/trees/damage_tracker.h" 12 #include "cc/trees/damage_tracker.h"
13 #include "cc/trees/layer_tree_impl.h" 13 #include "cc/trees/layer_tree_impl.h"
14 14
15 namespace cc { 15 namespace cc {
16 namespace { 16 namespace {
17 17
18 // These tests deal with compositing video. 18 // These tests deal with compositing video.
19 class LayerTreeHostVideoTest : public LayerTreeTest {}; 19 class LayerTreeHostVideoTest : public LayerTreeTest {};
20 20
21 class LayerTreeHostVideoTestSetNeedsDisplay 21 class LayerTreeHostVideoTestSetNeedsDisplay
22 : public LayerTreeHostVideoTest { 22 : public LayerTreeHostVideoTest {
23 public: 23 public:
24 void SetupTree() override { 24 void SetupTree() override {
25 scoped_refptr<Layer> root = Layer::Create(layer_settings()); 25 scoped_refptr<Layer> root = Layer::Create();
26 root->SetBounds(gfx::Size(10, 10)); 26 root->SetBounds(gfx::Size(10, 10));
27 root->SetIsDrawable(true); 27 root->SetIsDrawable(true);
28 28
29 scoped_refptr<VideoLayer> video = VideoLayer::Create( 29 scoped_refptr<VideoLayer> video =
30 layer_settings(), &video_frame_provider_, media::VIDEO_ROTATION_90); 30 VideoLayer::Create(&video_frame_provider_, media::VIDEO_ROTATION_90);
31 video->SetPosition(gfx::PointF(3.f, 3.f)); 31 video->SetPosition(gfx::PointF(3.f, 3.f));
32 video->SetBounds(gfx::Size(4, 5)); 32 video->SetBounds(gfx::Size(4, 5));
33 video->SetIsDrawable(true); 33 video->SetIsDrawable(true);
34 root->AddChild(video); 34 root->AddChild(video);
35 35
36 layer_tree_host()->SetRootLayer(root); 36 layer_tree_host()->SetRootLayer(root);
37 layer_tree_host()->SetDeviceScaleFactor(2.f); 37 layer_tree_host()->SetDeviceScaleFactor(2.f);
38 LayerTreeHostVideoTest::SetupTree(); 38 LayerTreeHostVideoTest::SetupTree();
39 } 39 }
40 40
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 private: 84 private:
85 int num_draws_; 85 int num_draws_;
86 86
87 FakeVideoFrameProvider video_frame_provider_; 87 FakeVideoFrameProvider video_frame_provider_;
88 }; 88 };
89 89
90 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostVideoTestSetNeedsDisplay); 90 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostVideoTestSetNeedsDisplay);
91 91
92 } // namespace 92 } // namespace
93 } // namespace cc 93 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698