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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Folded sync_point into sync_tokens Created 5 years, 1 month 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
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698