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

Side by Side Diff: cc/layers/video_layer_impl_unittest.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: Fixed. 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/layers/video_layer_impl.h" 5 #include "cc/layers/video_layer_impl.h"
6 6
7 #include "cc/layers/video_frame_provider_client_impl.h" 7 #include "cc/layers/video_frame_provider_client_impl.h"
8 #include "cc/output/context_provider.h" 8 #include "cc/output/context_provider.h"
9 #include "cc/output/output_surface.h" 9 #include "cc/output/output_surface.h"
10 #include "cc/test/fake_video_frame_provider.h" 10 #include "cc/test/fake_video_frame_provider.h"
(...skipping 16 matching lines...) Expand all
27 media::VideoFrame::CreateFrame(media::VideoFrame::YV12, 27 media::VideoFrame::CreateFrame(media::VideoFrame::YV12,
28 gfx::Size(10, 10), 28 gfx::Size(10, 10),
29 gfx::Rect(10, 10), 29 gfx::Rect(10, 10),
30 gfx::Size(10, 10), 30 gfx::Size(10, 10),
31 base::TimeDelta()); 31 base::TimeDelta());
32 FakeVideoFrameProvider provider; 32 FakeVideoFrameProvider provider;
33 provider.set_frame(video_frame); 33 provider.set_frame(video_frame);
34 34
35 VideoLayerImpl* video_layer_impl = 35 VideoLayerImpl* video_layer_impl =
36 impl.AddChildToRoot<VideoLayerImpl>(&provider); 36 impl.AddChildToRoot<VideoLayerImpl>(&provider);
37 video_layer_impl->SetAnchorPoint(gfx::PointF()); 37 video_layer_impl->SetTransformOrigin(gfx::Point3F());
38 video_layer_impl->SetBounds(layer_size); 38 video_layer_impl->SetBounds(layer_size);
39 video_layer_impl->SetContentBounds(layer_size); 39 video_layer_impl->SetContentBounds(layer_size);
40 video_layer_impl->SetDrawsContent(true); 40 video_layer_impl->SetDrawsContent(true);
41 41
42 impl.CalcDrawProps(viewport_size); 42 impl.CalcDrawProps(viewport_size);
43 43
44 { 44 {
45 SCOPED_TRACE("No occlusion"); 45 SCOPED_TRACE("No occlusion");
46 gfx::Rect occluded; 46 gfx::Rect occluded;
47 impl.AppendQuadsWithOcclusion(video_layer_impl, occluded); 47 impl.AppendQuadsWithOcclusion(video_layer_impl, occluded);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 static_cast<VideoFrameProviderClientImpl*>(provider.client()); 89 static_cast<VideoFrameProviderClientImpl*>(provider.client());
90 ASSERT_TRUE(client); 90 ASSERT_TRUE(client);
91 EXPECT_FALSE(client->active_video_layer()); 91 EXPECT_FALSE(client->active_video_layer());
92 92
93 video_layer_impl->DidBecomeActive(); 93 video_layer_impl->DidBecomeActive();
94 EXPECT_EQ(video_layer_impl, client->active_video_layer()); 94 EXPECT_EQ(video_layer_impl, client->active_video_layer());
95 } 95 }
96 96
97 } // namespace 97 } // namespace
98 } // namespace cc 98 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698