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

Side by Side Diff: cc/layers/video_layer_impl_unittest.cc

Issue 1505243003: Revert of Create RenderSurface on Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@alwayspt
Patch Set: rebase Created 5 years 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/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/test/layer_test_common.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 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/quads/draw_quad.h" 10 #include "cc/quads/draw_quad.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 gfx::Size layer_size(1000, 1000); 86 gfx::Size layer_size(1000, 1000);
87 gfx::Rect visible(layer_size); 87 gfx::Rect visible(layer_size);
88 88
89 LayerTestCommon::LayerImplTest impl; 89 LayerTestCommon::LayerImplTest impl;
90 impl.host_impl()->SetViewportSize(layer_size); 90 impl.host_impl()->SetViewportSize(layer_size);
91 DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider()); 91 DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
92 auto active_tree = impl.host_impl()->active_tree(); 92 auto active_tree = impl.host_impl()->active_tree();
93 93
94 // Create a video layer with no frame on top of another layer. 94 // Create a video layer with no frame on top of another layer.
95 scoped_ptr<LayerImpl> layer_impl = LayerImpl::Create(active_tree, 3); 95 scoped_ptr<LayerImpl> layer_impl = LayerImpl::Create(active_tree, 3);
96 layer_impl->SetForceRenderSurface(true); 96 layer_impl->SetHasRenderSurface(true);
97 layer_impl->SetBounds(layer_size); 97 layer_impl->SetBounds(layer_size);
98 layer_impl->SetDrawsContent(true); 98 layer_impl->SetDrawsContent(true);
99 const auto& draw_properties = layer_impl->draw_properties(); 99 const auto& draw_properties = layer_impl->draw_properties();
100 100
101 FakeVideoFrameProvider provider; 101 FakeVideoFrameProvider provider;
102 scoped_ptr<VideoLayerImpl> video_layer_impl = VideoLayerImpl::Create( 102 scoped_ptr<VideoLayerImpl> video_layer_impl = VideoLayerImpl::Create(
103 active_tree, 4, &provider, media::VIDEO_ROTATION_0); 103 active_tree, 4, &provider, media::VIDEO_ROTATION_0);
104 video_layer_impl->SetBounds(layer_size); 104 video_layer_impl->SetBounds(layer_size);
105 video_layer_impl->SetDrawsContent(true); 105 video_layer_impl->SetDrawsContent(true);
106 video_layer_impl->SetContentsOpaque(true); 106 video_layer_impl->SetContentsOpaque(true);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 const YUVVideoDrawQuad* yuv_draw_quad = 361 const YUVVideoDrawQuad* yuv_draw_quad =
362 static_cast<const YUVVideoDrawQuad*>(draw_quad); 362 static_cast<const YUVVideoDrawQuad*>(draw_quad);
363 EXPECT_EQ(yuv_draw_quad->uv_tex_size.height(), 363 EXPECT_EQ(yuv_draw_quad->uv_tex_size.height(),
364 (yuv_draw_quad->ya_tex_size.height() + 1) / 2); 364 (yuv_draw_quad->ya_tex_size.height() + 1) / 2);
365 EXPECT_EQ(yuv_draw_quad->uv_tex_size.width(), 365 EXPECT_EQ(yuv_draw_quad->uv_tex_size.width(),
366 (yuv_draw_quad->ya_tex_size.width() + 1) / 2); 366 (yuv_draw_quad->ya_tex_size.width() + 1) / 2);
367 } 367 }
368 368
369 } // namespace 369 } // namespace
370 } // namespace cc 370 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/test/layer_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698