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

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

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('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"
11 #include "cc/test/fake_video_frame_provider.h" 11 #include "cc/test/fake_video_frame_provider.h"
12 #include "cc/test/layer_tree_test.h" 12 #include "cc/test/layer_tree_test.h"
13 #include "cc/trees/damage_tracker.h" 13 #include "cc/trees/damage_tracker.h"
14 #include "cc/trees/layer_tree_impl.h" 14 #include "cc/trees/layer_tree_impl.h"
15 15
16 namespace cc { 16 namespace cc {
17 namespace { 17 namespace {
18 18
19 // These tests deal with compositing video. 19 // These tests deal with compositing video.
20 class LayerTreeHostVideoTest : public LayerTreeTest {}; 20 class LayerTreeHostVideoTest : public LayerTreeTest {};
21 21
22 class LayerTreeHostVideoTestSetNeedsDisplay 22 class LayerTreeHostVideoTestSetNeedsDisplay
23 : public LayerTreeHostVideoTest { 23 : public LayerTreeHostVideoTest {
24 public: 24 public:
25 virtual void SetupTree() OVERRIDE { 25 virtual void SetupTree() OVERRIDE {
26 scoped_refptr<Layer> root = Layer::Create(); 26 scoped_refptr<Layer> root = Layer::Create();
27 root->SetBounds(gfx::Size(10, 10)); 27 root->SetBounds(gfx::Size(10, 10));
28 root->SetAnchorPoint(gfx::PointF());
29 root->SetIsDrawable(true); 28 root->SetIsDrawable(true);
30 29
31 scoped_refptr<VideoLayer> video = VideoLayer::Create( 30 scoped_refptr<VideoLayer> video = VideoLayer::Create(
32 &video_frame_provider_); 31 &video_frame_provider_);
33 video->SetPosition(gfx::PointF(3.f, 3.f)); 32 video->SetPosition(gfx::PointF(3.f, 3.f));
34 video->SetBounds(gfx::Size(4, 4)); 33 video->SetBounds(gfx::Size(4, 4));
35 video->SetAnchorPoint(gfx::PointF());
36 video->SetIsDrawable(true); 34 video->SetIsDrawable(true);
37 root->AddChild(video); 35 root->AddChild(video);
38 36
39 layer_tree_host()->SetRootLayer(root); 37 layer_tree_host()->SetRootLayer(root);
40 layer_tree_host()->SetDeviceScaleFactor(2.f); 38 layer_tree_host()->SetDeviceScaleFactor(2.f);
41 LayerTreeHostVideoTest::SetupTree(); 39 LayerTreeHostVideoTest::SetupTree();
42 } 40 }
43 41
44 virtual void BeginTest() OVERRIDE { 42 virtual void BeginTest() OVERRIDE {
45 num_draws_ = 0; 43 num_draws_ = 0;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 private: 87 private:
90 int num_draws_; 88 int num_draws_;
91 89
92 FakeVideoFrameProvider video_frame_provider_; 90 FakeVideoFrameProvider video_frame_provider_;
93 }; 91 };
94 92
95 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostVideoTestSetNeedsDisplay); 93 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostVideoTestSetNeedsDisplay);
96 94
97 } // namespace 95 } // namespace
98 } // namespace cc 96 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698