| 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 MockCCQuadCuller_h | 5 #ifndef MockCCQuadCuller_h |
| 6 #define MockCCQuadCuller_h | 6 #define MockCCQuadCuller_h |
| 7 | 7 |
| 8 #include "CCDrawQuad.h" | 8 #include "CCDrawQuad.h" |
| 9 #include "CCQuadSink.h" | 9 #include "CCQuadSink.h" |
| 10 #include "CCRenderPass.h" | 10 #include "CCRenderPass.h" |
| 11 #include "IntRect.h" | 11 #include "IntRect.h" |
| 12 #include <wtf/PassOwnPtr.h> | 12 #include "base/memory/scoped_ptr.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class MockCCQuadCuller : public CCQuadSink { | 16 class MockCCQuadCuller : public CCQuadSink { |
| 17 public: | 17 public: |
| 18 MockCCQuadCuller(); | 18 MockCCQuadCuller(); |
| 19 virtual ~MockCCQuadCuller(); | 19 virtual ~MockCCQuadCuller(); |
| 20 | 20 |
| 21 MockCCQuadCuller(CCQuadList& externalQuadList, CCSharedQuadStateList& extern
alSharedQuadStateList); | 21 MockCCQuadCuller(CCQuadList& externalQuadList, CCSharedQuadStateList& extern
alSharedQuadStateList); |
| 22 | 22 |
| 23 virtual bool append(PassOwnPtr<CCDrawQuad> newQuad, CCAppendQuadsData&) OVER
RIDE; | 23 virtual bool append(scoped_ptr<CCDrawQuad> newQuad, CCAppendQuadsData&) OVER
RIDE; |
| 24 | 24 |
| 25 virtual CCSharedQuadState* useSharedQuadState(PassOwnPtr<CCSharedQuadState>
passSharedQuadState) OVERRIDE; | 25 virtual CCSharedQuadState* useSharedQuadState(scoped_ptr<CCSharedQuadState>
passSharedQuadState) OVERRIDE; |
| 26 | 26 |
| 27 const CCQuadList& quadList() const { return m_activeQuadList; }; | 27 const CCQuadList& quadList() const { return m_activeQuadList; }; |
| 28 const CCSharedQuadStateList& sharedQuadStateList() const { return m_activeSh
aredQuadStateList; }; | 28 const CCSharedQuadStateList& sharedQuadStateList() const { return m_activeSh
aredQuadStateList; }; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 CCQuadList& m_activeQuadList; | 31 CCQuadList& m_activeQuadList; |
| 32 CCQuadList m_quadListStorage; | 32 CCQuadList m_quadListStorage; |
| 33 CCSharedQuadStateList& m_activeSharedQuadStateList; | 33 CCSharedQuadStateList& m_activeSharedQuadStateList; |
| 34 CCSharedQuadStateList m_sharedQuadStateStorage; | 34 CCSharedQuadStateList m_sharedQuadStateStorage; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace cc | 37 } // namespace cc |
| 38 #endif // MockCCQuadCuller_h | 38 #endif // MockCCQuadCuller_h |
| OLD | NEW |