OLD | NEW |
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { | 193 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { |
194 EXPECT_EQ(a->resource_id, b->resource_id); | 194 EXPECT_EQ(a->resource_id, b->resource_id); |
195 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 195 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
196 EXPECT_EQ(a->texture_size, b->texture_size); | 196 EXPECT_EQ(a->texture_size, b->texture_size); |
197 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 197 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
198 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); | 198 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); |
199 } | 199 } |
200 | 200 |
201 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { | 201 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { |
202 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 202 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
203 EXPECT_EQ(a->tex_size, b->tex_size); | 203 EXPECT_EQ(a->ya_tex_size, b->ya_tex_size); |
| 204 EXPECT_EQ(a->uv_tex_size, b->uv_tex_size); |
204 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); | 205 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); |
205 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); | 206 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); |
206 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); | 207 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); |
207 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); | 208 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); |
208 EXPECT_EQ(a->color_space, b->color_space); | 209 EXPECT_EQ(a->color_space, b->color_space); |
209 } | 210 } |
210 | 211 |
211 void Compare(const TransferableResource& a, const TransferableResource& b) { | 212 void Compare(const TransferableResource& a, const TransferableResource& b) { |
212 EXPECT_EQ(a.id, b.id); | 213 EXPECT_EQ(a.id, b.id); |
213 EXPECT_EQ(a.format, b.format); | 214 EXPECT_EQ(a.format, b.format); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 464 |
464 YUVVideoDrawQuad* yuvvideo_in = | 465 YUVVideoDrawQuad* yuvvideo_in = |
465 pass_in->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 466 pass_in->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
466 yuvvideo_in->SetAll(shared_state3_in, | 467 yuvvideo_in->SetAll(shared_state3_in, |
467 arbitrary_rect1, | 468 arbitrary_rect1, |
468 arbitrary_rect2_inside_rect1, | 469 arbitrary_rect2_inside_rect1, |
469 arbitrary_rect1_inside_rect1, | 470 arbitrary_rect1_inside_rect1, |
470 arbitrary_bool1, | 471 arbitrary_bool1, |
471 arbitrary_rectf1, | 472 arbitrary_rectf1, |
472 arbitrary_size1, | 473 arbitrary_size1, |
| 474 arbitrary_size2, |
473 arbitrary_resourceid1, | 475 arbitrary_resourceid1, |
474 arbitrary_resourceid2, | 476 arbitrary_resourceid2, |
475 arbitrary_resourceid3, | 477 arbitrary_resourceid3, |
476 arbitrary_resourceid4, | 478 arbitrary_resourceid4, |
477 arbitrary_color_space); | 479 arbitrary_color_space); |
478 pass_cmp->CopyFromAndAppendDrawQuad(yuvvideo_in, | 480 pass_cmp->CopyFromAndAppendDrawQuad(yuvvideo_in, |
479 yuvvideo_in->shared_quad_state); | 481 yuvvideo_in->shared_quad_state); |
480 | 482 |
481 // Make sure the in and cmp RenderPasses match. | 483 // Make sure the in and cmp RenderPasses match. |
482 Compare(pass_cmp.get(), pass_in.get()); | 484 Compare(pass_cmp.get(), pass_in.get()); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 SoftwareFrameData frame_out; | 767 SoftwareFrameData frame_out; |
766 PickleIterator iter(msg); | 768 PickleIterator iter(msg); |
767 EXPECT_EQ( | 769 EXPECT_EQ( |
768 expect_read, | 770 expect_read, |
769 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); | 771 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); |
770 } | 772 } |
771 } | 773 } |
772 | 774 |
773 } // namespace | 775 } // namespace |
774 } // namespace content | 776 } // namespace content |
OLD | NEW |