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_MOCK_QUAD_CULLER_H_ | 5 #ifndef CC_TEST_MOCK_QUAD_CULLER_H_ |
6 #define CC_TEST_MOCK_QUAD_CULLER_H_ | 6 #define CC_TEST_MOCK_QUAD_CULLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/quad_sink.h" | 9 #include "cc/layers/quad_sink.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
11 #include "cc/quads/render_pass.h" | 11 #include "cc/quads/render_pass.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class MockQuadCuller : public QuadSink { | 15 class MockQuadCuller : public QuadSink { |
16 public: | 16 public: |
17 MockQuadCuller(); | 17 MockQuadCuller(); |
18 virtual ~MockQuadCuller(); | 18 virtual ~MockQuadCuller(); |
19 | 19 |
20 MockQuadCuller(QuadList& externalQuadList, SharedQuadStateList& externalShar
edQuadStateList); | 20 MockQuadCuller(QuadList& externalQuadList, SharedQuadStateList& externalShar
edQuadStateList); |
21 | 21 |
22 virtual bool Append(scoped_ptr<DrawQuad> draw_quad, AppendQuadsData* append_
quads_data) OVERRIDE; | 22 virtual bool Append(scoped_ptr<DrawQuad> draw_quad, AppendQuadsData* append_
quads_data) OVERRIDE; |
23 | 23 |
24 virtual SharedQuadState* UseSharedQuadState(scoped_ptr<SharedQuadState> shar
ed_quad_state) OVERRIDE; | 24 virtual SharedQuadState* UseSharedQuadState(scoped_ptr<SharedQuadState> shar
ed_quad_state) OVERRIDE; |
25 | 25 |
26 const QuadList& quadList() const { return m_activeQuadList; }; | 26 const QuadList& quadList() const { return m_activeQuadList; }; |
27 const SharedQuadStateList& sharedQuadStateList() const { return m_activeShar
edQuadStateList; }; | 27 const SharedQuadStateList& sharedQuadStateList() const { return m_activeShar
edQuadStateList; }; |
28 | 28 |
29 private: | 29 private: |
30 QuadList& m_activeQuadList; | 30 QuadList& m_activeQuadList; |
31 QuadList m_quadListStorage; | 31 QuadList m_quadListStorage; |
32 SharedQuadStateList& m_activeSharedQuadStateList; | 32 SharedQuadStateList& m_activeSharedQuadStateList; |
33 SharedQuadStateList m_sharedQuadStateStorage; | 33 SharedQuadStateList m_sharedQuadStateStorage; |
34 }; | 34 }; |
35 | 35 |
36 } // namespace cc | 36 } // namespace cc |
37 | 37 |
38 #endif // CC_TEST_MOCK_QUAD_CULLER_H_ | 38 #endif // CC_TEST_MOCK_QUAD_CULLER_H_ |
OLD | NEW |