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 3 // found in the LICENSE file. 4 5 #ifndef CC_TEST_MOCK_QUAD_CULLER_H_ 6 #define CC_TEST_MOCK_QUAD_CULLER_H_ 7 8 #include "base/memory/scoped_ptr.h" 9 #include "cc/layers/quad_sink.h" 10 #include "cc/quads/draw_quad.h" 11 #include "cc/quads/render_pass.h" 12 13 namespace cc { 14 15 class MockQuadCuller : public QuadSink { 16 public: 17 MockQuadCuller(); 18 virtual ~MockQuadCuller(); 19 20 MockQuadCuller(QuadList* external_quad_list, 21 SharedQuadStateList* external_shared_quad_state_list); 22 23 // QuadSink interface. 24 virtual bool Append(scoped_ptr<DrawQuad> draw_quad, 25 AppendQuadsData* append_quads_data) OVERRIDE; 26 virtual SharedQuadState* UseSharedQuadState( 27 scoped_ptr<SharedQuadState> shared_quad_state) OVERRIDE; 28 29 const QuadList& quad_list() const { return *active_quad_list_; } 30 const SharedQuadStateList& shared_quad_state_list() const { 31 return *active_shared_quad_state_list_; 32 } 33 34 private: 35 QuadList* active_quad_list_; 36 QuadList quad_list_storage_; 37 SharedQuadStateList* active_shared_quad_state_list_; 38 SharedQuadStateList shared_quad_state_storage_; 39 }; 40 41 } // namespace cc 42 43 #endif // CC_TEST_MOCK_QUAD_CULLER_H_ 44