| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } | 182 } |
| 183 | 183 |
| 184 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { | 184 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { |
| 185 EXPECT_EQ(a->resource_id, b->resource_id); | 185 EXPECT_EQ(a->resource_id, b->resource_id); |
| 186 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 186 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 187 EXPECT_EQ(a->texture_size, b->texture_size); | 187 EXPECT_EQ(a->texture_size, b->texture_size); |
| 188 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 188 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { | 191 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { |
| 192 EXPECT_EQ(a->tex_scale, b->tex_scale); | 192 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 193 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); | 193 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); |
| 194 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); | 194 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); |
| 195 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); | 195 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); |
| 196 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); | 196 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void Compare(const TransferableResource& a, const TransferableResource& b) { | 199 void Compare(const TransferableResource& a, const TransferableResource& b) { |
| 200 EXPECT_EQ(a.id, b.id); | 200 EXPECT_EQ(a.id, b.id); |
| 201 EXPECT_EQ(a.format, b.format); | 201 EXPECT_EQ(a.format, b.format); |
| 202 EXPECT_EQ(a.filter, b.filter); | 202 EXPECT_EQ(a.filter, b.filter); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 scoped_ptr<DrawQuad> tile_cmp = tile_in->Copy( | 413 scoped_ptr<DrawQuad> tile_cmp = tile_in->Copy( |
| 414 tile_in->shared_quad_state); | 414 tile_in->shared_quad_state); |
| 415 | 415 |
| 416 scoped_ptr<YUVVideoDrawQuad> yuvvideo_in = | 416 scoped_ptr<YUVVideoDrawQuad> yuvvideo_in = |
| 417 YUVVideoDrawQuad::Create(); | 417 YUVVideoDrawQuad::Create(); |
| 418 yuvvideo_in->SetAll(shared_state3_in.get(), | 418 yuvvideo_in->SetAll(shared_state3_in.get(), |
| 419 arbitrary_rect1, | 419 arbitrary_rect1, |
| 420 arbitrary_rect2_inside_rect1, | 420 arbitrary_rect2_inside_rect1, |
| 421 arbitrary_rect1_inside_rect1, | 421 arbitrary_rect1_inside_rect1, |
| 422 arbitrary_bool1, | 422 arbitrary_bool1, |
| 423 arbitrary_sizef1, | 423 arbitrary_rectf1, |
| 424 arbitrary_resourceid1, | 424 arbitrary_resourceid1, |
| 425 arbitrary_resourceid2, | 425 arbitrary_resourceid2, |
| 426 arbitrary_resourceid3, | 426 arbitrary_resourceid3, |
| 427 arbitrary_resourceid4); | 427 arbitrary_resourceid4); |
| 428 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( | 428 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( |
| 429 yuvvideo_in->shared_quad_state); | 429 yuvvideo_in->shared_quad_state); |
| 430 | 430 |
| 431 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); | 431 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); |
| 432 pass_in->SetAll(arbitrary_id, | 432 pass_in->SetAll(arbitrary_id, |
| 433 arbitrary_rect1, | 433 arbitrary_rect1, |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 } | 737 } |
| 738 | 738 |
| 739 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever | 739 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever |
| 740 // changes, then the ReserveSizeForRenderPassWrite() method needs to be | 740 // changes, then the ReserveSizeForRenderPassWrite() method needs to be |
| 741 // updated as well to use the new largest quad. | 741 // updated as well to use the new largest quad. |
| 742 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); | 742 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); |
| 743 } | 743 } |
| 744 | 744 |
| 745 } // namespace | 745 } // namespace |
| 746 } // namespace content | 746 } // namespace content |
| OLD | NEW |