| 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/quad_sink.h" | 9 #include "cc/quad_sink.h" |
| 10 #include "cc/render_pass_draw_quad.h" | 10 #include "cc/render_pass_draw_quad.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 | 63 |
| 64 FakeProxy m_proxy; | 64 FakeProxy m_proxy; |
| 65 DebugScopedSetImplThreadAndMainThreadBlocked m_alwaysImplThreadAndMainThread
Blocked; | 65 DebugScopedSetImplThreadAndMainThreadBlocked m_alwaysImplThreadAndMainThread
Blocked; |
| 66 scoped_ptr<LayerTreeHostImpl> m_hostImpl; | 66 scoped_ptr<LayerTreeHostImpl> m_hostImpl; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 static TestRenderPass* addRenderPass(ScopedPtrVector<RenderPass>& passList, Rend
erPass::Id id, gfx::Rect outputRect, WebTransformationMatrix rootTransform) | 69 static TestRenderPass* addRenderPass(ScopedPtrVector<RenderPass>& passList, Rend
erPass::Id id, gfx::Rect outputRect, WebTransformationMatrix rootTransform) |
| 70 { | 70 { |
| 71 scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); | 71 scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); |
| 72 pass->SetNew(id, outputRect, outputRect, rootTransform); | 72 pass->SetNew(id, outputRect, outputRect, rootTransform, NULL); |
| 73 TestRenderPass* saved = pass.get(); | 73 TestRenderPass* saved = pass.get(); |
| 74 passList.append(pass.PassAs<RenderPass>()); | 74 passList.append(pass.PassAs<RenderPass>()); |
| 75 return saved; | 75 return saved; |
| 76 } | 76 } |
| 77 | 77 |
| 78 static SolidColorDrawQuad* addQuad(TestRenderPass* pass, gfx::Rect rect, SkColor
color) | 78 static SolidColorDrawQuad* addQuad(TestRenderPass* pass, gfx::Rect rect, SkColor
color) |
| 79 { | 79 { |
| 80 MockQuadCuller quadSink(pass->quad_list, pass->shared_quad_state_list); | 80 MockQuadCuller quadSink(pass->quad_list, pass->shared_quad_state_list); |
| 81 AppendQuadsData data(pass->id); | 81 AppendQuadsData data(pass->id); |
| 82 SharedQuadState* sharedState = quadSink.useSharedQuadState(SharedQuadState::
Create()); | 82 SharedQuadState* sharedState = quadSink.useSharedQuadState(SharedQuadState::
Create()); |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 467 |
| 468 // The state should be transformed only once. | 468 // The state should be transformed only once. |
| 469 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_targe
t); | 469 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_targe
t); |
| 470 WebTransformationMatrix expected; | 470 WebTransformationMatrix expected; |
| 471 expected.translate(30, 30); | 471 expected.translate(30, 30); |
| 472 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_tra
nsform); | 472 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_tra
nsform); |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace | 475 } // namespace |
| 476 } // namespace cc | 476 } // namespace cc |
| OLD | NEW |