OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_LAYERS_QUAD_SINK_H_ | 5 #ifndef CC_LAYERS_QUAD_SINK_H_ |
6 #define CC_LAYERS_QUAD_SINK_H_ | 6 #define CC_LAYERS_QUAD_SINK_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 | 10 |
11 namespace gfx { | 11 namespace gfx { |
12 class Rect; | 12 class Rect; |
13 class Transform; | 13 class Transform; |
14 } | 14 } |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 |
18 class DrawQuad; | 18 class DrawQuad; |
| 19 class LayerImpl; |
19 class SharedQuadState; | 20 class SharedQuadState; |
20 | 21 |
21 class CC_EXPORT QuadSink { | 22 class CC_EXPORT QuadSink { |
22 public: | 23 public: |
23 virtual ~QuadSink() {} | 24 virtual ~QuadSink() {} |
24 | 25 |
25 // Call this to add a SharedQuadState before appending quads that refer to it. | 26 // Call this to add a SharedQuadState before appending quads that refer to it. |
26 // Returns a pointer to the given SharedQuadState for convenience, that can be | 27 // Returns a pointer to the given SharedQuadState for convenience, that can be |
27 // set on the quads to append. | 28 // set on the quads to append. |
28 virtual SharedQuadState* UseSharedQuadState( | 29 virtual SharedQuadState* UseSharedQuadState( |
29 scoped_ptr<SharedQuadState> shared_quad_state) = 0; | 30 scoped_ptr<SharedQuadState> shared_quad_state) = 0; |
30 | 31 |
31 virtual gfx::Rect UnoccludedContentRect( | 32 virtual gfx::Rect UnoccludedContentRect( |
32 const gfx::Rect& content_rect, | 33 const gfx::Rect& content_rect, |
33 const gfx::Transform& draw_transform) = 0; | 34 const gfx::Transform& draw_transform) = 0; |
34 | 35 |
| 36 virtual gfx::Rect UnoccludedContributingSurfaceContentRect( |
| 37 gfx::Rect& content_rect, |
| 38 gfx::Transform& draw_transform) = 0; |
| 39 |
35 // Returns true if the quad is added to the list, and false if the quad is | 40 // Returns true if the quad is added to the list, and false if the quad is |
36 // entirely culled. | 41 // entirely culled. |
37 virtual bool MaybeAppend(scoped_ptr<DrawQuad> draw_quad) = 0; | 42 virtual bool MaybeAppend(scoped_ptr<DrawQuad> draw_quad) = 0; |
38 | 43 |
39 virtual void Append(scoped_ptr<DrawQuad> draw_quad) = 0; | 44 virtual void Append(scoped_ptr<DrawQuad> draw_quad) = 0; |
40 }; | 45 }; |
41 | 46 |
42 } // namespace cc | 47 } // namespace cc |
43 | 48 |
44 #endif // CC_LAYERS_QUAD_SINK_H_ | 49 #endif // CC_LAYERS_QUAD_SINK_H_ |
OLD | NEW |