| 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 EXPECT_EQ(a->texture_size, b->texture_size); | 193 EXPECT_EQ(a->texture_size, b->texture_size); |
| 194 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 194 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { | 197 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { |
| 198 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 198 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 199 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); | 199 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); |
| 200 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); | 200 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); |
| 201 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); | 201 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); |
| 202 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); | 202 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); |
| 203 EXPECT_EQ(a->has_jpeg_color_range, b->has_jpeg_color_range); |
| 203 } | 204 } |
| 204 | 205 |
| 205 void Compare(const TransferableResource& a, const TransferableResource& b) { | 206 void Compare(const TransferableResource& a, const TransferableResource& b) { |
| 206 EXPECT_EQ(a.id, b.id); | 207 EXPECT_EQ(a.id, b.id); |
| 207 EXPECT_EQ(a.format, b.format); | 208 EXPECT_EQ(a.format, b.format); |
| 208 EXPECT_EQ(a.filter, b.filter); | 209 EXPECT_EQ(a.filter, b.filter); |
| 209 EXPECT_EQ(a.size.ToString(), b.size.ToString()); | 210 EXPECT_EQ(a.size.ToString(), b.size.ToString()); |
| 210 for (size_t i = 0; i < arraysize(a.mailbox_holder.mailbox.name); ++i) { | 211 for (size_t i = 0; i < arraysize(a.mailbox_holder.mailbox.name); ++i) { |
| 211 EXPECT_EQ(a.mailbox_holder.mailbox.name[i], | 212 EXPECT_EQ(a.mailbox_holder.mailbox.name[i], |
| 212 b.mailbox_holder.mailbox.name[i]); | 213 b.mailbox_holder.mailbox.name[i]); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 YUVVideoDrawQuad::Create(); | 424 YUVVideoDrawQuad::Create(); |
| 424 yuvvideo_in->SetAll(shared_state3_in.get(), | 425 yuvvideo_in->SetAll(shared_state3_in.get(), |
| 425 arbitrary_rect1, | 426 arbitrary_rect1, |
| 426 arbitrary_rect2_inside_rect1, | 427 arbitrary_rect2_inside_rect1, |
| 427 arbitrary_rect1_inside_rect1, | 428 arbitrary_rect1_inside_rect1, |
| 428 arbitrary_bool1, | 429 arbitrary_bool1, |
| 429 arbitrary_rectf1, | 430 arbitrary_rectf1, |
| 430 arbitrary_resourceid1, | 431 arbitrary_resourceid1, |
| 431 arbitrary_resourceid2, | 432 arbitrary_resourceid2, |
| 432 arbitrary_resourceid3, | 433 arbitrary_resourceid3, |
| 433 arbitrary_resourceid4); | 434 arbitrary_resourceid4, |
| 435 arbitrary_bool1); |
| 434 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( | 436 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( |
| 435 yuvvideo_in->shared_quad_state); | 437 yuvvideo_in->shared_quad_state); |
| 436 | 438 |
| 437 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); | 439 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); |
| 438 pass_in->SetAll(arbitrary_id, | 440 pass_in->SetAll(arbitrary_id, |
| 439 arbitrary_rect1, | 441 arbitrary_rect1, |
| 440 arbitrary_rect2, | 442 arbitrary_rect2, |
| 441 arbitrary_matrix, | 443 arbitrary_matrix, |
| 442 arbitrary_bool1); | 444 arbitrary_bool1); |
| 443 | 445 |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 SoftwareFrameData frame_out; | 810 SoftwareFrameData frame_out; |
| 809 PickleIterator iter(msg); | 811 PickleIterator iter(msg); |
| 810 EXPECT_EQ( | 812 EXPECT_EQ( |
| 811 expect_read, | 813 expect_read, |
| 812 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); | 814 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); |
| 813 } | 815 } |
| 814 } | 816 } |
| 815 | 817 |
| 816 } // namespace | 818 } // namespace |
| 817 } // namespace content | 819 } // namespace content |
| OLD | NEW |