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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 EXPECT_EQ(a->texture_size, b->texture_size); | 178 EXPECT_EQ(a->texture_size, b->texture_size); |
179 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 179 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
180 } | 180 } |
181 | 181 |
182 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { | 182 void Compare(const YUVVideoDrawQuad* a, const YUVVideoDrawQuad* b) { |
183 EXPECT_EQ(a->tex_scale, b->tex_scale); | 183 EXPECT_EQ(a->tex_scale, b->tex_scale); |
184 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); | 184 EXPECT_EQ(a->y_plane_resource_id, b->y_plane_resource_id); |
185 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); | 185 EXPECT_EQ(a->u_plane_resource_id, b->u_plane_resource_id); |
186 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); | 186 EXPECT_EQ(a->v_plane_resource_id, b->v_plane_resource_id); |
187 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); | 187 EXPECT_EQ(a->a_plane_resource_id, b->a_plane_resource_id); |
188 EXPECT_EQ(a->has_jpeg_color_range, b->has_jpeg_color_range); | |
188 } | 189 } |
189 | 190 |
190 void Compare(const TransferableResource& a, const TransferableResource& b) { | 191 void Compare(const TransferableResource& a, const TransferableResource& b) { |
191 EXPECT_EQ(a.id, b.id); | 192 EXPECT_EQ(a.id, b.id); |
192 EXPECT_EQ(a.sync_point, b.sync_point); | 193 EXPECT_EQ(a.sync_point, b.sync_point); |
193 EXPECT_EQ(a.format, b.format); | 194 EXPECT_EQ(a.format, b.format); |
194 EXPECT_EQ(a.target, b.target); | 195 EXPECT_EQ(a.target, b.target); |
195 EXPECT_EQ(a.filter, b.filter); | 196 EXPECT_EQ(a.filter, b.filter); |
196 EXPECT_EQ(a.size.ToString(), b.size.ToString()); | 197 EXPECT_EQ(a.size.ToString(), b.size.ToString()); |
197 for (size_t i = 0; i < arraysize(a.mailbox.name); ++i) | 198 for (size_t i = 0; i < arraysize(a.mailbox.name); ++i) |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
395 YUVVideoDrawQuad::Create(); | 396 YUVVideoDrawQuad::Create(); |
396 yuvvideo_in->SetAll(shared_state3_in.get(), | 397 yuvvideo_in->SetAll(shared_state3_in.get(), |
397 arbitrary_rect1, | 398 arbitrary_rect1, |
398 arbitrary_rect2_inside_rect1, | 399 arbitrary_rect2_inside_rect1, |
399 arbitrary_rect1_inside_rect1, | 400 arbitrary_rect1_inside_rect1, |
400 arbitrary_bool1, | 401 arbitrary_bool1, |
401 arbitrary_sizef1, | 402 arbitrary_sizef1, |
402 arbitrary_resourceid1, | 403 arbitrary_resourceid1, |
403 arbitrary_resourceid2, | 404 arbitrary_resourceid2, |
404 arbitrary_resourceid3, | 405 arbitrary_resourceid3, |
405 arbitrary_resourceid4); | 406 arbitrary_resourceid4, |
407 false); | |
danakj
2013/12/03 21:35:34
arbitrary_bool1
| |
406 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( | 408 scoped_ptr<DrawQuad> yuvvideo_cmp = yuvvideo_in->Copy( |
407 yuvvideo_in->shared_quad_state); | 409 yuvvideo_in->shared_quad_state); |
408 | 410 |
409 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); | 411 scoped_ptr<RenderPass> pass_in = RenderPass::Create(); |
410 pass_in->SetAll(arbitrary_id, | 412 pass_in->SetAll(arbitrary_id, |
411 arbitrary_rect1, | 413 arbitrary_rect1, |
412 arbitrary_rectf1, | 414 arbitrary_rectf1, |
413 arbitrary_matrix, | 415 arbitrary_matrix, |
414 arbitrary_bool1); | 416 arbitrary_bool1); |
415 | 417 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
714 } | 716 } |
715 | 717 |
716 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever | 718 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever |
717 // changes, then the ReserveSizeForRenderPassWrite() method needs to be | 719 // changes, then the ReserveSizeForRenderPassWrite() method needs to be |
718 // updated as well to use the new largest quad. | 720 // updated as well to use the new largest quad. |
719 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); | 721 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); |
720 } | 722 } |
721 | 723 |
722 } // namespace | 724 } // namespace |
723 } // namespace content | 725 } // namespace content |
OLD | NEW |