OLD | NEW |
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 impl.quad_list() | 280 impl.quad_list() |
281 .front() | 281 .front() |
282 ->shared_quad_state->quad_to_target_transform.TransformPoint(&p1); | 282 ->shared_quad_state->quad_to_target_transform.TransformPoint(&p1); |
283 impl.quad_list() | 283 impl.quad_list() |
284 .front() | 284 .front() |
285 ->shared_quad_state->quad_to_target_transform.TransformPoint(&p2); | 285 ->shared_quad_state->quad_to_target_transform.TransformPoint(&p2); |
286 EXPECT_EQ(gfx::Point3F(100, 50, 0), p1); | 286 EXPECT_EQ(gfx::Point3F(100, 50, 0), p1); |
287 EXPECT_EQ(gfx::Point3F(0, 0, 0), p2); | 287 EXPECT_EQ(gfx::Point3F(0, 0, 0), p2); |
288 } | 288 } |
289 | 289 |
290 void EmptyCallback(unsigned sync_point) { | 290 void EmptyCallback(const gpu::SyncToken& sync_token) {} |
291 } | |
292 | 291 |
293 TEST(VideoLayerImplTest, SoftwareVideoFrameGeneratesYUVQuad) { | 292 TEST(VideoLayerImplTest, SoftwareVideoFrameGeneratesYUVQuad) { |
294 gfx::Size layer_size(1000, 1000); | 293 gfx::Size layer_size(1000, 1000); |
295 gfx::Size viewport_size(1000, 1000); | 294 gfx::Size viewport_size(1000, 1000); |
296 | 295 |
297 LayerTestCommon::LayerImplTest impl; | 296 LayerTestCommon::LayerImplTest impl; |
298 DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider()); | 297 DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider()); |
299 | 298 |
300 gpu::MailboxHolder mailbox_holder; | 299 gpu::MailboxHolder mailbox_holder; |
301 mailbox_holder.mailbox.name[0] = 1; | 300 mailbox_holder.mailbox.name[0] = 1; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 const YUVVideoDrawQuad* yuv_draw_quad = | 361 const YUVVideoDrawQuad* yuv_draw_quad = |
363 static_cast<const YUVVideoDrawQuad*>(draw_quad); | 362 static_cast<const YUVVideoDrawQuad*>(draw_quad); |
364 EXPECT_EQ(yuv_draw_quad->uv_tex_size.height(), | 363 EXPECT_EQ(yuv_draw_quad->uv_tex_size.height(), |
365 (yuv_draw_quad->ya_tex_size.height() + 1) / 2); | 364 (yuv_draw_quad->ya_tex_size.height() + 1) / 2); |
366 EXPECT_EQ(yuv_draw_quad->uv_tex_size.width(), | 365 EXPECT_EQ(yuv_draw_quad->uv_tex_size.width(), |
367 (yuv_draw_quad->ya_tex_size.width() + 1) / 2); | 366 (yuv_draw_quad->ya_tex_size.width() + 1) / 2); |
368 } | 367 } |
369 | 368 |
370 } // namespace | 369 } // namespace |
371 } // namespace cc | 370 } // namespace cc |
OLD | NEW |