| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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->y_plane_resource_id, b->y_plane_resource_id); | 203 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); |
| 203 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); | 204 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); |
| 204 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); | 205 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); |
| 205 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); | 206 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); |
| 206 EXPECT_EQ(a->color_space, b->color_space); | 207 EXPECT_EQ(a->color_space, b->color_space); |
| 207 } | 208 } |
| 208 | 209 |
| 209 void Compare(const TransferableResource& a, const TransferableResource& b) { | 210 void Compare(const TransferableResource& a, const TransferableResource& b) { |
| 210 EXPECT_EQ(a.id, b.id); | 211 EXPECT_EQ(a.id, b.id); |
| 211 EXPECT_EQ(a.format, b.format); | 212 EXPECT_EQ(a.format, b.format); |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 pass_cmp->CopyFromAndAppendDrawQuad(tile_in, tile_in->shared_quad_state); | 463 pass_cmp->CopyFromAndAppendDrawQuad(tile_in, tile_in->shared_quad_state); |
| 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, |
| 473 arbitrary_size1, |
| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 SoftwareFrameData frame_out; | 774 SoftwareFrameData frame_out; |
| 773 PickleIterator iter(msg); | 775 PickleIterator iter(msg); |
| 774 EXPECT_EQ( | 776 EXPECT_EQ( |
| 775 expect_read, | 777 expect_read, |
| 776 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); | 778 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); |
| 777 } | 779 } |
| 778 } | 780 } |
| 779 | 781 |
| 780 } // namespace | 782 } // namespace |
| 781 } // namespace content | 783 } // namespace content |
| OLD | NEW |