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_SINK_H_
6 #define CC_QUAD_SINK_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/cc_export.h"
14 class SharedQuadState
;
16 struct AppendQuadsData
;
18 class CC_EXPORT QuadSink
{
20 virtual ~QuadSink() { }
22 // Call this to add a SharedQuadState before appending quads that refer to it. Returns a pointer
23 // to the given SharedQuadState for convenience, that can be set on the quads to append.
24 virtual SharedQuadState
* useSharedQuadState(scoped_ptr
<SharedQuadState
>) = 0;
26 // Returns true if the quad is added to the list, and false if the quad is entirely culled.
27 virtual bool append(scoped_ptr
<DrawQuad
> passDrawQuad
, AppendQuadsData
&) = 0;
31 #endif // CC_QUAD_SINK_H_