| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/quads/render_pass.h" | 5 #include "cc/quads/render_pass.h" |
| 6 | 6 |
| 7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
| 8 #include "cc/base/scoped_ptr_vector.h" | 8 #include "cc/base/scoped_ptr_vector.h" |
| 9 #include "cc/output/copy_output_request.h" | 9 #include "cc/output/copy_output_request.h" |
| 10 #include "cc/quads/checkerboard_draw_quad.h" | 10 #include "cc/quads/checkerboard_draw_quad.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 EXPECT_EQ(expected->shared_quad_state_list.size(), | 51 EXPECT_EQ(expected->shared_quad_state_list.size(), |
| 52 actual->shared_quad_state_list.size()); | 52 actual->shared_quad_state_list.size()); |
| 53 EXPECT_EQ(expected->quad_list.size(), actual->quad_list.size()); | 53 EXPECT_EQ(expected->quad_list.size(), actual->quad_list.size()); |
| 54 | 54 |
| 55 for (auto exp_iter = expected->quad_list.cbegin(), | 55 for (auto exp_iter = expected->quad_list.cbegin(), |
| 56 act_iter = actual->quad_list.cbegin(); | 56 act_iter = actual->quad_list.cbegin(); |
| 57 exp_iter != expected->quad_list.cend(); | 57 exp_iter != expected->quad_list.cend(); |
| 58 ++exp_iter, ++act_iter) { | 58 ++exp_iter, ++act_iter) { |
| 59 EXPECT_EQ(exp_iter->rect.ToString(), act_iter->rect.ToString()); | 59 EXPECT_EQ(exp_iter->rect.ToString(), act_iter->rect.ToString()); |
| 60 EXPECT_EQ(exp_iter->shared_quad_state->content_bounds.ToString(), | 60 EXPECT_EQ(exp_iter->shared_quad_state->quad_layer_bounds.ToString(), |
| 61 act_iter->shared_quad_state->content_bounds.ToString()); | 61 act_iter->shared_quad_state->quad_layer_bounds.ToString()); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) { | 66 TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) { |
| 67 RenderPassId id(3, 2); | 67 RenderPassId id(3, 2); |
| 68 gfx::Rect output_rect(45, 22, 120, 13); | 68 gfx::Rect output_rect(45, 22, 120, 13); |
| 69 gfx::Transform transform_to_root = | 69 gfx::Transform transform_to_root = |
| 70 gfx::Transform(1.0, 0.5, 0.5, -0.5, -1.0, 0.0); | 70 gfx::Transform(1.0, 0.5, 0.5, -0.5, -1.0, 0.0); |
| 71 gfx::Rect damage_rect(56, 123, 19, 43); | 71 gfx::Rect damage_rect(56, 123, 19, 43); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 // Make a copy with CopyAll(). | 309 // Make a copy with CopyAll(). |
| 310 RenderPassList copy_list; | 310 RenderPassList copy_list; |
| 311 RenderPass::CopyAll(pass_list, ©_list); | 311 RenderPass::CopyAll(pass_list, ©_list); |
| 312 | 312 |
| 313 CompareRenderPassLists(pass_list, copy_list); | 313 CompareRenderPassLists(pass_list, copy_list); |
| 314 } | 314 } |
| 315 | 315 |
| 316 } // namespace | 316 } // namespace |
| 317 } // namespace cc | 317 } // namespace cc |
| OLD | NEW |