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_LAYERS_QUAD_SINK_H_
6 #define CC_LAYERS_QUAD_SINK_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h"
20 class SharedQuadState;
22 class CC_EXPORT QuadSink {
24 virtual ~QuadSink() {}
26 // Call this to add a SharedQuadState before appending quads that refer to it.
27 // Returns a pointer to the given SharedQuadState, that can be set on the
29 virtual SharedQuadState* CreateSharedQuadState() = 0;
31 virtual gfx::Rect UnoccludedContentRect(
32 const gfx::Rect& content_rect,
33 const gfx::Transform& draw_transform) = 0;
35 virtual gfx::Rect UnoccludedContributingSurfaceContentRect(
36 const gfx::Rect& content_rect,
37 const gfx::Transform& draw_transform) = 0;
39 virtual void Append(scoped_ptr<DrawQuad> draw_quad) = 0;
44 #endif // CC_LAYERS_QUAD_SINK_H_