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_QUAD_CULLER_H_
6 #define CC_QUAD_CULLER_H_
8 #include "cc/cc_export.h"
9 #include "cc/quad_sink.h"
10 #include "cc/render_pass.h"
14 class RenderSurfaceImpl
;
15 template<typename LayerType
, typename SurfaceType
>
16 class OcclusionTrackerBase
;
18 class CC_EXPORT QuadCuller
: public QuadSink
{
20 QuadCuller(QuadList
&, SharedQuadStateList
&, const LayerImpl
*, const OcclusionTrackerBase
<LayerImpl
, RenderSurfaceImpl
>&, bool showCullingWithDebugBorderQuads
, bool forSurface
);
21 virtual ~QuadCuller() { }
23 // QuadSink implementation.
24 virtual SharedQuadState
* useSharedQuadState(scoped_ptr
<SharedQuadState
>) OVERRIDE
;
25 virtual bool append(scoped_ptr
<DrawQuad
>, AppendQuadsData
&) OVERRIDE
;
29 SharedQuadStateList
& m_sharedQuadStateList
;
30 const LayerImpl
* m_layer
;
31 const OcclusionTrackerBase
<LayerImpl
, RenderSurfaceImpl
>& m_occlusionTracker
;
33 SharedQuadState
* m_currentSharedQuadState
;
34 bool m_showCullingWithDebugBorderQuads
;
39 #endif // CC_QUAD_CULLER_H_