Getting rid of GetDefaultProfile(), clean up of ProfileManager (which was in a seriou...
[chromium-blink-merge.git] / cc / trees / quad_culler.h
blobbe0095f9f41f4629b54c4728a34c5fa022f7aa87
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_TREES_QUAD_CULLER_H_
6 #define CC_TREES_QUAD_CULLER_H_
8 #include "cc/base/cc_export.h"
9 #include "cc/layers/quad_sink.h"
10 #include "cc/quads/render_pass.h"
12 namespace cc {
13 class LayerImpl;
14 class RenderSurfaceImpl;
15 template <typename LayerType, typename SurfaceType> class OcclusionTrackerBase;
17 class CC_EXPORT QuadCuller : public QuadSink {
18 public:
19 QuadCuller(QuadList* quad_list,
20 SharedQuadStateList* shared_quad_state_list,
21 const LayerImpl* layer,
22 const OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>&
23 occlusion_tracker,
24 bool show_culling_with_debug_border_quads,
25 bool for_surface);
26 virtual ~QuadCuller() {}
28 // QuadSink implementation.
29 virtual SharedQuadState* UseSharedQuadState(
30 scoped_ptr<SharedQuadState> shared_quad_state) OVERRIDE;
31 virtual bool Append(scoped_ptr<DrawQuad> draw_quad,
32 AppendQuadsData* append_quads_data) OVERRIDE;
34 private:
35 QuadList* quad_list_;
36 SharedQuadStateList* shared_quad_state_list_;
37 const LayerImpl* layer_;
38 const OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>& occlusion_tracker_;
40 SharedQuadState* current_shared_quad_state_;
41 bool show_culling_with_debug_border_quads_;
42 bool for_surface_;
44 DISALLOW_COPY_AND_ASSIGN(QuadCuller);
47 } // namespace cc
49 #endif // CC_TREES_QUAD_CULLER_H_