| 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/test/render_pass_test_utils.h" | 5 #include "cc/test/render_pass_test_utils.h" |
| 6 | 6 |
| 7 #include "cc/append_quads_data.h" | 7 #include "cc/append_quads_data.h" |
| 8 #include "cc/quad_sink.h" | 8 #include "cc/quad_sink.h" |
| 9 #include "cc/render_pass_draw_quad.h" | 9 #include "cc/render_pass_draw_quad.h" |
| 10 #include "cc/shared_quad_state.h" | 10 #include "cc/shared_quad_state.h" |
| 11 #include "cc/solid_color_draw_quad.h" | 11 #include "cc/solid_color_draw_quad.h" |
| 12 #include "cc/test/mock_quad_culler.h" | 12 #include "cc/test/mock_quad_culler.h" |
| 13 #include "cc/test/render_pass_test_common.h" | 13 #include "cc/test/render_pass_test_common.h" |
| 14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 TestRenderPass* addRenderPass(ScopedPtrVector<RenderPass>& passList, | 18 TestRenderPass* addRenderPass(RenderPassList& passList, |
| 19 RenderPass::Id id, | 19 RenderPass::Id id, |
| 20 const gfx::Rect& outputRect, | 20 const gfx::Rect& outputRect, |
| 21 const gfx::Transform& rootTransform) { | 21 const gfx::Transform& rootTransform) { |
| 22 scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); | 22 scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); |
| 23 pass->SetNew(id, outputRect, outputRect, rootTransform); | 23 pass->SetNew(id, outputRect, outputRect, rootTransform); |
| 24 TestRenderPass* saved = pass.get(); | 24 TestRenderPass* saved = pass.get(); |
| 25 passList.append(pass.PassAs<RenderPass>()); | 25 passList.append(pass.PassAs<RenderPass>()); |
| 26 return saved; | 26 return saved; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 51 sharedState->SetAll(gfx::Transform(), outputRect, outputRect, outputRect, | 51 sharedState->SetAll(gfx::Transform(), outputRect, outputRect, outputRect, |
| 52 false, 1); | 52 false, 1); |
| 53 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); | 53 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); |
| 54 quad->SetNew(sharedState, outputRect, contributingPass->id, false, 0, | 54 quad->SetNew(sharedState, outputRect, contributingPass->id, false, 0, |
| 55 outputRect, gfx::RectF(), WebKit::WebFilterOperations(), | 55 outputRect, gfx::RectF(), WebKit::WebFilterOperations(), |
| 56 skia::RefPtr<SkImageFilter>(), WebKit::WebFilterOperations()); | 56 skia::RefPtr<SkImageFilter>(), WebKit::WebFilterOperations()); |
| 57 quadSink.append(quad.PassAs<DrawQuad>(), data); | 57 quadSink.append(quad.PassAs<DrawQuad>(), data); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace cc | 60 } // namespace cc |
| OLD | NEW |