Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / cc / layers / quad_sink.h
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.
4
5 #ifndef CC_LAYERS_QUAD_SINK_H_
6 #define CC_LAYERS_QUAD_SINK_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h"
10
11 namespace gfx {
12 class Rect;
13 class Transform;
14 }
15
16 namespace cc {
17
18 class DrawQuad;
19 class LayerImpl;
20 class SharedQuadState;
21
22 class CC_EXPORT QuadSink {
23  public:
24   virtual ~QuadSink() {}
25
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
28   // quads to append.
29   virtual SharedQuadState* CreateSharedQuadState() = 0;
30
31   virtual gfx::Rect UnoccludedContentRect(
32       const gfx::Rect& content_rect,
33       const gfx::Transform& draw_transform) = 0;
34
35   virtual gfx::Rect UnoccludedContributingSurfaceContentRect(
36       const gfx::Rect& content_rect,
37       const gfx::Transform& draw_transform) = 0;
38
39   virtual void Append(scoped_ptr<DrawQuad> draw_quad) = 0;
40 };
41
42 }  // namespace cc
43
44 #endif  // CC_LAYERS_QUAD_SINK_H_