| 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 "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 void Compare(const TextureDrawQuad* a, const TextureDrawQuad* b) { | 151 void Compare(const TextureDrawQuad* a, const TextureDrawQuad* b) { |
| 152 EXPECT_EQ(a->resource_id, b->resource_id); | 152 EXPECT_EQ(a->resource_id, b->resource_id); |
| 153 EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha); | 153 EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha); |
| 154 EXPECT_EQ(a->uv_top_left, b->uv_top_left); | 154 EXPECT_EQ(a->uv_top_left, b->uv_top_left); |
| 155 EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right); | 155 EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right); |
| 156 EXPECT_EQ(a->vertex_opacity[0], b->vertex_opacity[0]); | 156 EXPECT_EQ(a->vertex_opacity[0], b->vertex_opacity[0]); |
| 157 EXPECT_EQ(a->vertex_opacity[1], b->vertex_opacity[1]); | 157 EXPECT_EQ(a->vertex_opacity[1], b->vertex_opacity[1]); |
| 158 EXPECT_EQ(a->vertex_opacity[2], b->vertex_opacity[2]); | 158 EXPECT_EQ(a->vertex_opacity[2], b->vertex_opacity[2]); |
| 159 EXPECT_EQ(a->vertex_opacity[3], b->vertex_opacity[3]); | 159 EXPECT_EQ(a->vertex_opacity[3], b->vertex_opacity[3]); |
| 160 EXPECT_EQ(a->background_color, b->background_color); |
| 160 EXPECT_EQ(a->flipped, b->flipped); | 161 EXPECT_EQ(a->flipped, b->flipped); |
| 161 } | 162 } |
| 162 | 163 |
| 163 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { | 164 void Compare(const TileDrawQuad* a, const TileDrawQuad* b) { |
| 164 EXPECT_EQ(a->resource_id, b->resource_id); | 165 EXPECT_EQ(a->resource_id, b->resource_id); |
| 165 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); | 166 EXPECT_EQ(a->tex_coord_rect, b->tex_coord_rect); |
| 166 EXPECT_EQ(a->texture_size, b->texture_size); | 167 EXPECT_EQ(a->texture_size, b->texture_size); |
| 167 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); | 168 EXPECT_EQ(a->swizzle_contents, b->swizzle_contents); |
| 168 } | 169 } |
| 169 | 170 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 texture_in->SetAll(shared_state1_in.get(), | 341 texture_in->SetAll(shared_state1_in.get(), |
| 341 arbitrary_rect2, | 342 arbitrary_rect2, |
| 342 arbitrary_rect3, | 343 arbitrary_rect3, |
| 343 arbitrary_rect1, | 344 arbitrary_rect1, |
| 344 arbitrary_bool1, | 345 arbitrary_bool1, |
| 345 arbitrary_resourceid1, | 346 arbitrary_resourceid1, |
| 346 arbitrary_bool2, | 347 arbitrary_bool2, |
| 347 arbitrary_pointf1, | 348 arbitrary_pointf1, |
| 348 arbitrary_pointf2, | 349 arbitrary_pointf2, |
| 349 arbitrary_float_array, | 350 arbitrary_float_array, |
| 351 arbitrary_color, |
| 350 arbitrary_bool3); | 352 arbitrary_bool3); |
| 351 scoped_ptr<DrawQuad> texture_cmp = texture_in->Copy( | 353 scoped_ptr<DrawQuad> texture_cmp = texture_in->Copy( |
| 352 texture_in->shared_quad_state); | 354 texture_in->shared_quad_state); |
| 353 | 355 |
| 354 scoped_ptr<TileDrawQuad> tile_in = TileDrawQuad::Create(); | 356 scoped_ptr<TileDrawQuad> tile_in = TileDrawQuad::Create(); |
| 355 tile_in->SetAll(shared_state1_in.get(), | 357 tile_in->SetAll(shared_state1_in.get(), |
| 356 arbitrary_rect2, | 358 arbitrary_rect2, |
| 357 arbitrary_rect3, | 359 arbitrary_rect3, |
| 358 arbitrary_rect1, | 360 arbitrary_rect1, |
| 359 arbitrary_bool1, | 361 arbitrary_bool1, |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, | 523 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, |
| 522 &iter, &frame_out)); | 524 &iter, &frame_out)); |
| 523 | 525 |
| 524 ASSERT_EQ(2u, frame_out.resource_list.size()); | 526 ASSERT_EQ(2u, frame_out.resource_list.size()); |
| 525 Compare(arbitrary_resource1, frame_out.resource_list[0]); | 527 Compare(arbitrary_resource1, frame_out.resource_list[0]); |
| 526 Compare(arbitrary_resource2, frame_out.resource_list[1]); | 528 Compare(arbitrary_resource2, frame_out.resource_list[1]); |
| 527 } | 529 } |
| 528 | 530 |
| 529 } // namespace | 531 } // namespace |
| 530 } // namespace content | 532 } // namespace content |
| OLD | NEW |