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

Side by Side Diff: cc/ipc/cc_param_traits_unittest.cc

Issue 2684993005: (NotForReview) Enable YUV video overlay on Skylake ChromeOS.
Patch Set: rebase to ToT (Mar/27) Created 3 years, 9 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
« no previous file with comments | « cc/ipc/cc_param_traits_macros.h ('k') | cc/ipc/quads.mojom » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <string.h> 6 #include <string.h>
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 void Compare(const SolidColorDrawQuad* a, const SolidColorDrawQuad* b) { 159 void Compare(const SolidColorDrawQuad* a, const SolidColorDrawQuad* b) {
160 EXPECT_EQ(a->color, b->color); 160 EXPECT_EQ(a->color, b->color);
161 EXPECT_EQ(a->force_anti_aliasing_off, b->force_anti_aliasing_off); 161 EXPECT_EQ(a->force_anti_aliasing_off, b->force_anti_aliasing_off);
162 } 162 }
163 163
164 void Compare(const StreamVideoDrawQuad* a, const StreamVideoDrawQuad* b) { 164 void Compare(const StreamVideoDrawQuad* a, const StreamVideoDrawQuad* b) {
165 EXPECT_EQ(a->resource_id(), b->resource_id()); 165 EXPECT_EQ(a->resource_id(), b->resource_id());
166 EXPECT_EQ(a->resource_size_in_pixels(), b->resource_size_in_pixels()); 166 EXPECT_EQ(a->resource_size_in_pixels(), b->resource_size_in_pixels());
167 EXPECT_EQ(a->format, b->format);
167 EXPECT_EQ(a->matrix, b->matrix); 168 EXPECT_EQ(a->matrix, b->matrix);
168 } 169 }
169 170
170 void Compare(const SurfaceDrawQuad* a, const SurfaceDrawQuad* b) { 171 void Compare(const SurfaceDrawQuad* a, const SurfaceDrawQuad* b) {
171 EXPECT_EQ(a->surface_id, b->surface_id); 172 EXPECT_EQ(a->surface_id, b->surface_id);
172 } 173 }
173 174
174 void Compare(const TextureDrawQuad* a, const TextureDrawQuad* b) { 175 void Compare(const TextureDrawQuad* a, const TextureDrawQuad* b) {
175 EXPECT_EQ(a->resource_id(), b->resource_id()); 176 EXPECT_EQ(a->resource_id(), b->resource_id());
176 EXPECT_EQ(a->resource_size_in_pixels(), b->resource_size_in_pixels()); 177 EXPECT_EQ(a->resource_size_in_pixels(), b->resource_size_in_pixels());
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 gfx::Size arbitrary_size1(15, 19); 251 gfx::Size arbitrary_size1(15, 19);
251 gfx::Size arbitrary_size2(3, 99); 252 gfx::Size arbitrary_size2(3, 99);
252 gfx::Size arbitrary_size3(75, 1281); 253 gfx::Size arbitrary_size3(75, 1281);
253 gfx::RectF arbitrary_rectf1(4.2f, -922.1f, 15.6f, 29.5f); 254 gfx::RectF arbitrary_rectf1(4.2f, -922.1f, 15.6f, 29.5f);
254 gfx::RectF arbitrary_rectf2(2.1f, -411.05f, 7.8f, 14.75f); 255 gfx::RectF arbitrary_rectf2(2.1f, -411.05f, 7.8f, 14.75f);
255 gfx::SizeF arbitrary_sizef1(15.2f, 104.6f); 256 gfx::SizeF arbitrary_sizef1(15.2f, 104.6f);
256 gfx::PointF arbitrary_pointf1(31.4f, 15.9f); 257 gfx::PointF arbitrary_pointf1(31.4f, 15.9f);
257 gfx::PointF arbitrary_pointf2(26.5f, -35.8f); 258 gfx::PointF arbitrary_pointf2(26.5f, -35.8f);
258 gfx::Vector2dF arbitrary_vector2df1(16.2f, -85.1f); 259 gfx::Vector2dF arbitrary_vector2df1(16.2f, -85.1f);
259 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f); 260 gfx::Vector2dF arbitrary_vector2df2(-8.3f, 0.47f);
261 gfx::BufferFormat arbitrary_format = gfx::BufferFormat::YVU_420;
260 float arbitrary_float1 = 0.7f; 262 float arbitrary_float1 = 0.7f;
261 float arbitrary_float2 = 0.3f; 263 float arbitrary_float2 = 0.3f;
262 float arbitrary_float3 = 0.9f; 264 float arbitrary_float3 = 0.9f;
263 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f}; 265 float arbitrary_float_array[4] = {3.5f, 6.2f, 9.3f, 12.3f};
264 bool arbitrary_bool1 = true; 266 bool arbitrary_bool1 = true;
265 bool arbitrary_bool2 = false; 267 bool arbitrary_bool2 = false;
266 bool arbitrary_bool3 = true; 268 bool arbitrary_bool3 = true;
267 bool arbitrary_bool4 = true; 269 bool arbitrary_bool4 = true;
268 bool arbitrary_bool5 = false; 270 bool arbitrary_bool5 = false;
269 bool arbitrary_bool6 = true; 271 bool arbitrary_bool6 = true;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 arbitrary_rect2_inside_rect3, arbitrary_bool1, 373 arbitrary_rect2_inside_rect3, arbitrary_bool1,
372 arbitrary_color, arbitrary_bool2); 374 arbitrary_color, arbitrary_bool2);
373 pass_cmp->CopyFromAndAppendDrawQuad(solidcolor_in, 375 pass_cmp->CopyFromAndAppendDrawQuad(solidcolor_in,
374 solidcolor_in->shared_quad_state); 376 solidcolor_in->shared_quad_state);
375 377
376 StreamVideoDrawQuad* streamvideo_in = 378 StreamVideoDrawQuad* streamvideo_in =
377 pass_in->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); 379 pass_in->CreateAndAppendDrawQuad<StreamVideoDrawQuad>();
378 streamvideo_in->SetAll( 380 streamvideo_in->SetAll(
379 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2, 381 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2,
380 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid2, 382 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid2,
381 arbitrary_size1, arbitrary_matrix1); 383 arbitrary_size1, arbitrary_format, arbitrary_matrix1);
382 pass_cmp->CopyFromAndAppendDrawQuad(streamvideo_in, 384 pass_cmp->CopyFromAndAppendDrawQuad(streamvideo_in,
383 streamvideo_in->shared_quad_state); 385 streamvideo_in->shared_quad_state);
384 386
385 cc::SurfaceId arbitrary_surface_id( 387 cc::SurfaceId arbitrary_surface_id(
386 kArbitraryFrameSinkId, 388 kArbitraryFrameSinkId,
387 cc::LocalSurfaceId(3, base::UnguessableToken::Create())); 389 cc::LocalSurfaceId(3, base::UnguessableToken::Create()));
388 SurfaceDrawQuad* surface_in = 390 SurfaceDrawQuad* surface_in =
389 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 391 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
390 surface_in->SetAll(shared_state3_in, arbitrary_rect2, 392 surface_in->SetAll(shared_state3_in, arbitrary_rect2,
391 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, 393 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 cc::SurfaceInfo surface_info_out; 648 cc::SurfaceInfo surface_info_out;
647 base::PickleIterator iter(msg); 649 base::PickleIterator iter(msg);
648 EXPECT_TRUE( 650 EXPECT_TRUE(
649 IPC::ParamTraits<cc::SurfaceInfo>::Read(&msg, &iter, &surface_info_out)); 651 IPC::ParamTraits<cc::SurfaceInfo>::Read(&msg, &iter, &surface_info_out));
650 652
651 ASSERT_EQ(surface_info_in, surface_info_out); 653 ASSERT_EQ(surface_info_in, surface_info_out);
652 } 654 }
653 655
654 } // namespace 656 } // namespace
655 } // namespace content 657 } // namespace content
OLDNEW
« no previous file with comments | « cc/ipc/cc_param_traits_macros.h ('k') | cc/ipc/quads.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698