| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 EXPECT_EQ(a->y_flipped, b->y_flipped); | 184 EXPECT_EQ(a->y_flipped, b->y_flipped); |
| 185 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); | 185 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { | 188 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { |
| 189 EXPECT_EQ(a->resource_id(), b->resource_id()); | 189 EXPECT_EQ(a->resource_id(), b->resource_id()); |
| 190 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 190 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 191 EXPECT_EQ(a->texture_size, b->texture_size); | 191 EXPECT_EQ(a->texture_size, b->texture_size); |
| 192 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 192 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
| 193 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); | 193 EXPECT_EQ(a->nearest_neighbor, b->nearest_neighbor); |
| 194 EXPECT_EQ(a->allow_overlay, b->allow_overlay); |
| 194 } | 195 } |
| 195 | 196 |
| 196 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { | 197 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { |
| 197 EXPECT_EQ(a->ya_tex_coord_rect, b->ya_tex_coord_rect); | 198 EXPECT_EQ(a->ya_tex_coord_rect, b->ya_tex_coord_rect); |
| 198 EXPECT_EQ(a->uv_tex_coord_rect, b->uv_tex_coord_rect); | 199 EXPECT_EQ(a->uv_tex_coord_rect, b->uv_tex_coord_rect); |
| 199 EXPECT_EQ(a->ya_tex_size, b->ya_tex_size); | 200 EXPECT_EQ(a->ya_tex_size, b->ya_tex_size); |
| 200 EXPECT_EQ(a->uv_tex_size, b->uv_tex_size); | 201 EXPECT_EQ(a->uv_tex_size, b->uv_tex_size); |
| 201 EXPECT_EQ(a->y_plane_resource_id(), b->y_plane_resource_id()); | 202 EXPECT_EQ(a->y_plane_resource_id(), b->y_plane_resource_id()); |
| 202 EXPECT_EQ(a->u_plane_resource_id(), b->u_plane_resource_id()); | 203 EXPECT_EQ(a->u_plane_resource_id(), b->u_plane_resource_id()); |
| 203 EXPECT_EQ(a->v_plane_resource_id(), b->v_plane_resource_id()); | 204 EXPECT_EQ(a->v_plane_resource_id(), b->v_plane_resource_id()); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>(); | 422 TileDrawQuad* tile_in = pass_in->CreateAndAppendDrawQuad<TileDrawQuad>(); |
| 422 tile_in->SetAll(shared_state3_in, | 423 tile_in->SetAll(shared_state3_in, |
| 423 arbitrary_rect2, | 424 arbitrary_rect2, |
| 424 arbitrary_rect2_inside_rect2, | 425 arbitrary_rect2_inside_rect2, |
| 425 arbitrary_rect1_inside_rect2, | 426 arbitrary_rect1_inside_rect2, |
| 426 arbitrary_bool1, | 427 arbitrary_bool1, |
| 427 arbitrary_resourceid3, | 428 arbitrary_resourceid3, |
| 428 arbitrary_rectf1, | 429 arbitrary_rectf1, |
| 429 arbitrary_size1, | 430 arbitrary_size1, |
| 430 arbitrary_bool2, | 431 arbitrary_bool2, |
| 431 arbitrary_bool3); | 432 arbitrary_bool3, |
| 433 arbitrary_bool4); |
| 432 pass_cmp->CopyFromAndAppendDrawQuad(tile_in, tile_in->shared_quad_state); | 434 pass_cmp->CopyFromAndAppendDrawQuad(tile_in, tile_in->shared_quad_state); |
| 433 | 435 |
| 434 YUVVideoDrawQuad* yuvvideo_in = | 436 YUVVideoDrawQuad* yuvvideo_in = |
| 435 pass_in->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 437 pass_in->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
| 436 yuvvideo_in->SetAll( | 438 yuvvideo_in->SetAll( |
| 437 shared_state3_in, arbitrary_rect1, arbitrary_rect2_inside_rect1, | 439 shared_state3_in, arbitrary_rect1, arbitrary_rect2_inside_rect1, |
| 438 arbitrary_rect1_inside_rect1, arbitrary_bool1, arbitrary_rectf1, | 440 arbitrary_rect1_inside_rect1, arbitrary_bool1, arbitrary_rectf1, |
| 439 arbitrary_rectf2, arbitrary_size1, arbitrary_size2, arbitrary_resourceid1, | 441 arbitrary_rectf2, arbitrary_size1, arbitrary_size2, arbitrary_resourceid1, |
| 440 arbitrary_resourceid2, arbitrary_resourceid3, arbitrary_resourceid4, | 442 arbitrary_resourceid2, arbitrary_resourceid3, arbitrary_resourceid4, |
| 441 arbitrary_color_space); | 443 arbitrary_color_space); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, | 675 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, |
| 674 &iter, &frame_out)); | 676 &iter, &frame_out)); |
| 675 | 677 |
| 676 ASSERT_EQ(2u, frame_out.resource_list.size()); | 678 ASSERT_EQ(2u, frame_out.resource_list.size()); |
| 677 Compare(arbitrary_resource1, frame_out.resource_list[0]); | 679 Compare(arbitrary_resource1, frame_out.resource_list[0]); |
| 678 Compare(arbitrary_resource2, frame_out.resource_list[1]); | 680 Compare(arbitrary_resource2, frame_out.resource_list[1]); |
| 679 } | 681 } |
| 680 | 682 |
| 681 } // namespace | 683 } // namespace |
| 682 } // namespace content | 684 } // namespace content |
| OLD | NEW |