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

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: 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/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/test/fake_content_layer.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 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());
38 video_layer_impl->SetBounds(layer_size); 37 video_layer_impl->SetBounds(layer_size);
39 video_layer_impl->SetContentBounds(layer_size); 38 video_layer_impl->SetContentBounds(layer_size);
40 video_layer_impl->SetDrawsContent(true); 39 video_layer_impl->SetDrawsContent(true);
41 40
42 impl.CalcDrawProps(viewport_size); 41 impl.CalcDrawProps(viewport_size);
43 42
44 { 43 {
45 SCOPED_TRACE("No occlusion"); 44 SCOPED_TRACE("No occlusion");
46 gfx::Rect occluded; 45 gfx::Rect occluded;
47 impl.AppendQuadsWithOcclusion(video_layer_impl, occluded); 46 impl.AppendQuadsWithOcclusion(video_layer_impl, occluded);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 static_cast<VideoFrameProviderClientImpl*>(provider.client()); 88 static_cast<VideoFrameProviderClientImpl*>(provider.client());
90 ASSERT_TRUE(client); 89 ASSERT_TRUE(client);
91 EXPECT_FALSE(client->active_video_layer()); 90 EXPECT_FALSE(client->active_video_layer());
92 91
93 video_layer_impl->DidBecomeActive(); 92 video_layer_impl->DidBecomeActive();
94 EXPECT_EQ(video_layer_impl, client->active_video_layer()); 93 EXPECT_EQ(video_layer_impl, client->active_video_layer());
95 } 94 }
96 95
97 } // namespace 96 } // namespace
98 } // namespace cc 97 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/test/fake_content_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698