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/delegated_renderer_layer_impl.h" | 5 #include "cc/delegated_renderer_layer_impl.h" |
6 | 6 |
7 #include "cc/append_quads_data.h" | 7 #include "cc/append_quads_data.h" |
8 #include "cc/layer_tree_host_impl.h" | 8 #include "cc/layer_tree_host_impl.h" |
9 #include "cc/layer_tree_impl.h" | 9 #include "cc/layer_tree_impl.h" |
10 #include "cc/quad_sink.h" | 10 #include "cc/quad_sink.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 ASSERT_EQ(4u, quadList.size()); | 444 ASSERT_EQ(4u, quadList.size()); |
445 | 445 |
446 // All quads should share the same state. | 446 // All quads should share the same state. |
447 const SharedQuadState* sharedState = quadList[0]->shared_quad_state; | 447 const SharedQuadState* sharedState = quadList[0]->shared_quad_state; |
448 EXPECT_EQ(sharedState, quadList[1]->shared_quad_state); | 448 EXPECT_EQ(sharedState, quadList[1]->shared_quad_state); |
449 EXPECT_EQ(sharedState, quadList[2]->shared_quad_state); | 449 EXPECT_EQ(sharedState, quadList[2]->shared_quad_state); |
450 EXPECT_EQ(sharedState, quadList[3]->shared_quad_state); | 450 EXPECT_EQ(sharedState, quadList[3]->shared_quad_state); |
451 | 451 |
452 // The state should be transformed only once. | 452 // The state should be transformed only once. |
453 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_targe
t); | 453 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_targe
t); |
| 454 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clip_rect); |
454 gfx::Transform expected; | 455 gfx::Transform expected; |
455 expected.Translate(30, 30); | 456 expected.Translate(30, 30); |
456 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_tra
nsform); | 457 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_tra
nsform); |
457 | 458 |
458 m_hostImpl->drawLayers(frame); | 459 m_hostImpl->drawLayers(frame); |
459 m_hostImpl->didDrawAllLayers(frame); | 460 m_hostImpl->didDrawAllLayers(frame); |
460 } | 461 } |
461 | 462 |
462 } // namespace | 463 } // namespace |
463 } // namespace cc | 464 } // namespace cc |
OLD | NEW |