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.
5 #ifndef CC_TEST_MOCK_QUAD_CULLER_H_
6 #define CC_TEST_MOCK_QUAD_CULLER_H_
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"
15 class MockQuadCuller
: public QuadSink
{
18 virtual ~MockQuadCuller();
20 MockQuadCuller(QuadList
* external_quad_list
,
21 SharedQuadStateList
* external_shared_quad_state_list
);
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
;
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_
;
35 QuadList
* active_quad_list_
;
36 QuadList quad_list_storage_
;
37 SharedQuadStateList
* active_shared_quad_state_list_
;
38 SharedQuadStateList shared_quad_state_storage_
;
43 #endif // CC_TEST_MOCK_QUAD_CULLER_H_