| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(id, outputRect, rootT
ransform)); | 71 scoped_ptr<TestRenderPass> pass(TestRenderPass::create(id, outputRect, rootT
ransform)); |
| 72 TestRenderPass* saved = pass.get(); | 72 TestRenderPass* saved = pass.get(); |
| 73 passList.append(pass.PassAs<RenderPass>()); | 73 passList.push_back(pass.PassAs<RenderPass>()); |
| 74 return saved; | 74 return saved; |
| 75 } | 75 } |
| 76 | 76 |
| 77 static SolidColorDrawQuad* addQuad(TestRenderPass* pass, gfx::Rect rect, SkColor
color) | 77 static SolidColorDrawQuad* addQuad(TestRenderPass* pass, gfx::Rect rect, SkColor
color) |
| 78 { | 78 { |
| 79 MockQuadCuller quadSink(pass->quadList(), pass->sharedQuadStateList()); | 79 MockQuadCuller quadSink(pass->quadList(), pass->sharedQuadStateList()); |
| 80 AppendQuadsData data(pass->id()); | 80 AppendQuadsData data(pass->id()); |
| 81 SharedQuadState* sharedState = quadSink.useSharedQuadState(SharedQuadState::
create(WebTransformationMatrix(), rect, rect, 1)); | 81 SharedQuadState* sharedState = quadSink.useSharedQuadState(SharedQuadState::
create(WebTransformationMatrix(), rect, rect, 1)); |
| 82 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); | 82 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); |
| 83 quad->SetNew(sharedState, rect, color); | 83 quad->SetNew(sharedState, rect, color); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 | 463 |
| 464 // The state should be transformed only once. | 464 // The state should be transformed only once. |
| 465 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clippedRectInTarget); | 465 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clippedRectInTarget); |
| 466 WebTransformationMatrix expected; | 466 WebTransformationMatrix expected; |
| 467 expected.translate(30, 30); | 467 expected.translate(30, 30); |
| 468 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->quadTransform); | 468 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->quadTransform); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace | 471 } // namespace |
| 472 } // namespace cc | 472 } // namespace cc |
| OLD | NEW |