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