OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CCLayerImpl_h | 5 #ifndef CCLayerImpl_h |
6 #define CCLayerImpl_h | 6 #define CCLayerImpl_h |
7 | 7 |
8 #include "CCInputHandler.h" | 8 #include "CCInputHandler.h" |
9 #include "CCLayerAnimationController.h" | 9 #include "CCLayerAnimationController.h" |
| 10 #include "CCRenderPass.h" |
10 #include "CCRenderSurface.h" | 11 #include "CCRenderSurface.h" |
11 #include "CCResourceProvider.h" | 12 #include "CCResourceProvider.h" |
12 #include "CCSharedQuadState.h" | 13 #include "CCSharedQuadState.h" |
13 #include "FloatRect.h" | 14 #include "FloatRect.h" |
14 #include "IntRect.h" | 15 #include "IntRect.h" |
15 #include "Region.h" | 16 #include "Region.h" |
16 #include "SkColor.h" | 17 #include "SkColor.h" |
17 #include "cc/own_ptr_vector.h" | 18 #include "cc/own_ptr_vector.h" |
18 #include <public/WebFilterOperations.h> | 19 #include <public/WebFilterOperations.h> |
19 #include <public/WebTransformationMatrix.h> | 20 #include <public/WebTransformationMatrix.h> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // willDraw must be called before appendQuads. If willDraw is called, | 75 // willDraw must be called before appendQuads. If willDraw is called, |
75 // didDraw is guaranteed to be called before another willDraw or before | 76 // didDraw is guaranteed to be called before another willDraw or before |
76 // the layer is destroyed. To enforce this, any class that overrides | 77 // the layer is destroyed. To enforce this, any class that overrides |
77 // willDraw/didDraw must call the base class version. | 78 // willDraw/didDraw must call the base class version. |
78 virtual void willDraw(CCResourceProvider*); | 79 virtual void willDraw(CCResourceProvider*); |
79 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) { } | 80 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) { } |
80 virtual void didDraw(CCResourceProvider*); | 81 virtual void didDraw(CCResourceProvider*); |
81 | 82 |
82 virtual CCResourceProvider::ResourceId contentsResourceId() const; | 83 virtual CCResourceProvider::ResourceId contentsResourceId() const; |
83 | 84 |
| 85 virtual bool hasContributingDelegatedRenderPasses() const { return false; } |
| 86 virtual CCRenderPass::Id firstContributingRenderPassId() const { return CCRe
nderPass::Id(0, 0); } |
| 87 virtual CCRenderPass::Id nextContributingRenderPassId(CCRenderPass::Id) cons
t { return CCRenderPass::Id(0, 0); } |
| 88 |
84 // Returns true if this layer has content to draw. | 89 // Returns true if this layer has content to draw. |
85 void setDrawsContent(bool); | 90 void setDrawsContent(bool); |
86 bool drawsContent() const { return m_drawsContent; } | 91 bool drawsContent() const { return m_drawsContent; } |
87 | 92 |
88 bool forceRenderSurface() const { return m_forceRenderSurface; } | 93 bool forceRenderSurface() const { return m_forceRenderSurface; } |
89 void setForceRenderSurface(bool force) { m_forceRenderSurface = force; } | 94 void setForceRenderSurface(bool force) { m_forceRenderSurface = force; } |
90 | 95 |
91 // Returns true if any of the layer's descendants has content to draw. | 96 // Returns true if any of the layer's descendants has content to draw. |
92 bool descendantDrawsContent(); | 97 virtual bool descendantDrawsContent(); |
93 | 98 |
94 void setAnchorPoint(const FloatPoint&); | 99 void setAnchorPoint(const FloatPoint&); |
95 const FloatPoint& anchorPoint() const { return m_anchorPoint; } | 100 const FloatPoint& anchorPoint() const { return m_anchorPoint; } |
96 | 101 |
97 void setAnchorPointZ(float); | 102 void setAnchorPointZ(float); |
98 float anchorPointZ() const { return m_anchorPointZ; } | 103 float anchorPointZ() const { return m_anchorPointZ; } |
99 | 104 |
100 void setBackgroundColor(SkColor); | 105 void setBackgroundColor(SkColor); |
101 SkColor backgroundColor() const { return m_backgroundColor; } | 106 SkColor backgroundColor() const { return m_backgroundColor; } |
102 | 107 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 | 388 |
384 // Manages scrollbars for this layer | 389 // Manages scrollbars for this layer |
385 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; | 390 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; |
386 }; | 391 }; |
387 | 392 |
388 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter
ator end, CCLayerSorter*); | 393 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter
ator end, CCLayerSorter*); |
389 | 394 |
390 } | 395 } |
391 | 396 |
392 #endif // CCLayerImpl_h | 397 #endif // CCLayerImpl_h |
OLD | NEW |