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

Side by Side Diff: content/common/cc_messages_unittest.cc

Issue 1008493002: Increase YUV video clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 | « content/common/cc_messages.h ('k') | mojo/converters/surfaces/surfaces_type_converters.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 (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 "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { 192 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) {
193 EXPECT_EQ(a->resource_id, b->resource_id); 193 EXPECT_EQ(a->resource_id, b->resource_id);
194 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); 194 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect);
195 EXPECT_EQ(a->texture_size, b->texture_size); 195 EXPECT_EQ(a->texture_size, b->texture_size);
196 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); 196 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents);
197 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); 197 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor);
198 } 198 }
199 199
200 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { 200 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) {
201 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); 201 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect);
202 EXPECT_EQ(a->tex_size, b->tex_size); 202 EXPECT_EQ(a->ya_tex_size, b->ya_tex_size);
203 EXPECT_EQ(a->uv_tex_size, b->uv_tex_size);
203 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); 204 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id);
204 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); 205 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id);
205 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); 206 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id);
206 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); 207 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id);
207 EXPECT_EQ(a->color_space, b->color_space); 208 EXPECT_EQ(a->color_space, b->color_space);
208 } 209 }
209 210
210 void Compare(const TransferableResource& a, const TransferableResource& b) { 211 void Compare(const TransferableResource& a, const TransferableResource& b) {
211 EXPECT_EQ(a.id, b.id); 212 EXPECT_EQ(a.id, b.id);
212 EXPECT_EQ(a.format, b.format); 213 EXPECT_EQ(a.format, b.format);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 463
463 YUVVideoDrawQuad* yuvvideo_in = 464 YUVVideoDrawQuad* yuvvideo_in =
464 pass_in->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); 465 pass_in->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
465 yuvvideo_in->SetAll(shared_state3_in, 466 yuvvideo_in->SetAll(shared_state3_in,
466 arbitrary_rect1, 467 arbitrary_rect1,
467 arbitrary_rect2_inside_rect1, 468 arbitrary_rect2_inside_rect1,
468 arbitrary_rect1_inside_rect1, 469 arbitrary_rect1_inside_rect1,
469 arbitrary_bool1, 470 arbitrary_bool1,
470 arbitrary_rectf1, 471 arbitrary_rectf1,
471 arbitrary_size1, 472 arbitrary_size1,
473 arbitrary_size2,
472 arbitrary_resourceid1, 474 arbitrary_resourceid1,
473 arbitrary_resourceid2, 475 arbitrary_resourceid2,
474 arbitrary_resourceid3, 476 arbitrary_resourceid3,
475 arbitrary_resourceid4, 477 arbitrary_resourceid4,
476 arbitrary_color_space); 478 arbitrary_color_space);
477 pass_cmp->CopyFromAndAppendDrawQuad(yuvvideo_in, 479 pass_cmp->CopyFromAndAppendDrawQuad(yuvvideo_in,
478 yuvvideo_in->shared_quad_state); 480 yuvvideo_in->shared_quad_state);
479 481
480 // Make sure the in and cmp RenderPasses match. 482 // Make sure the in and cmp RenderPasses match.
481 Compare(pass_cmp.get(), pass_in.get()); 483 Compare(pass_cmp.get(), pass_in.get());
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 SoftwareFrameData frame_out; 766 SoftwareFrameData frame_out;
765 PickleIterator iter(msg); 767 PickleIterator iter(msg);
766 EXPECT_EQ( 768 EXPECT_EQ(
767 expect_read, 769 expect_read,
768 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); 770 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
769 } 771 }
770 } 772 }
771 773
772 } // namespace 774 } // namespace
773 } // namespace content 775 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698