| 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 #ifndef CC_TEST_RENDER_PASS_TEST_COMMON_H_ | 5 #ifndef CC_TEST_RENDER_PASS_TEST_COMMON_H_ |
| 6 #define CC_TEST_RENDER_PASS_TEST_COMMON_H_ | 6 #define CC_TEST_RENDER_PASS_TEST_COMMON_H_ |
| 7 | 7 |
| 8 #include "cc/render_pass.h" | 8 #include "cc/render_pass.h" |
| 9 | 9 |
| 10 namespace cc { |
| 11 class ResourceProvider; |
| 12 } |
| 13 |
| 10 namespace WebKitTests { | 14 namespace WebKitTests { |
| 11 | 15 |
| 12 class TestRenderPass : public cc::RenderPass { | 16 class TestRenderPass : public cc::RenderPass { |
| 13 public: | 17 public: |
| 14 static scoped_ptr<TestRenderPass> create(Id id, gfx::Rect outputRect, const
WebKit::WebTransformationMatrix& transformToRootTarget) { | 18 static scoped_ptr<TestRenderPass> create(Id id, gfx::Rect outputRect, const
WebKit::WebTransformationMatrix& transformToRootTarget) { |
| 15 return make_scoped_ptr(new TestRenderPass(id, outputRect, transformToRoo
tTarget)); | 19 return make_scoped_ptr(new TestRenderPass(id, outputRect, transformToRoo
tTarget)); |
| 16 } | 20 } |
| 17 | 21 |
| 18 cc::QuadList& quadList() { return m_quadList; } | 22 cc::QuadList& quadList() { return m_quadList; } |
| 19 cc::SharedQuadStateList& sharedQuadStateList() { return m_sharedQuadStateLis
t; } | 23 cc::SharedQuadStateList& sharedQuadStateList() { return m_sharedQuadStateLis
t; } |
| 20 | 24 |
| 21 void appendQuad(scoped_ptr<cc::DrawQuad> quad) { m_quadList.append(quad.Pass
()); } | 25 void appendQuad(scoped_ptr<cc::DrawQuad> quad) { m_quadList.append(quad.Pass
()); } |
| 22 void appendSharedQuadState(scoped_ptr<cc::SharedQuadState> state) { m_shared
QuadStateList.append(state.Pass()); } | 26 void appendSharedQuadState(scoped_ptr<cc::SharedQuadState> state) { m_shared
QuadStateList.append(state.Pass()); } |
| 23 | 27 |
| 28 void appendOneOfEveryQuadType(cc::ResourceProvider*); |
| 29 |
| 24 protected: | 30 protected: |
| 25 TestRenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformationM
atrix& transformToRootTarget) | 31 TestRenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformationM
atrix& transformToRootTarget) |
| 26 : RenderPass(id, outputRect, transformToRootTarget) { } | 32 : RenderPass(id, outputRect, transformToRootTarget) { } |
| 27 }; | 33 }; |
| 28 | 34 |
| 29 } // namespace WebKitTests | 35 } // namespace WebKitTests |
| 30 | 36 |
| 31 #endif // CC_TEST_RENDER_PASS_TEST_COMMON_H_ | 37 #endif // CC_TEST_RENDER_PASS_TEST_COMMON_H_ |
| OLD | NEW |