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 | 5 |
6 #ifndef CCRenderSurface_h | 6 #ifndef CCRenderSurface_h |
7 #define CCRenderSurface_h | 7 #define CCRenderSurface_h |
8 | 8 |
9 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
10 | 10 |
11 #include "CCRenderPass.h" | 11 #include "CCRenderPass.h" |
12 #include "CCSharedQuadState.h" | 12 #include "CCSharedQuadState.h" |
13 #include "FloatRect.h" | 13 #include "FloatRect.h" |
14 #include "IntRect.h" | 14 #include "IntRect.h" |
15 #include <public/WebTransformationMatrix.h> | 15 #include <public/WebTransformationMatrix.h> |
16 #include <wtf/Noncopyable.h> | 16 #include <wtf/Noncopyable.h> |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 | 19 |
20 class CCDamageTracker; | 20 class CCDamageTracker; |
| 21 class CCDelegatedRendererLayerImpl; |
21 class CCQuadSink; | 22 class CCQuadSink; |
22 class CCRenderPassSink; | 23 class CCRenderPassSink; |
23 class CCLayerImpl; | 24 class CCLayerImpl; |
24 | 25 |
25 struct CCAppendQuadsData; | 26 struct CCAppendQuadsData; |
26 | 27 |
27 class CCRenderSurface { | 28 class CCRenderSurface { |
28 WTF_MAKE_NONCOPYABLE(CCRenderSurface); | 29 WTF_MAKE_NONCOPYABLE(CCRenderSurface); |
29 public: | 30 public: |
30 explicit CCRenderSurface(CCLayerImpl*); | 31 explicit CCRenderSurface(CCLayerImpl*); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTra
nsformsAreAnimating = animating; } | 66 void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTra
nsformsAreAnimating = animating; } |
66 | 67 |
67 void setClipRect(const IntRect&); | 68 void setClipRect(const IntRect&); |
68 const IntRect& clipRect() const { return m_clipRect; } | 69 const IntRect& clipRect() const { return m_clipRect; } |
69 | 70 |
70 bool contentsChanged() const; | 71 bool contentsChanged() const; |
71 | 72 |
72 void setContentRect(const IntRect&); | 73 void setContentRect(const IntRect&); |
73 const IntRect& contentRect() const { return m_contentRect; } | 74 const IntRect& contentRect() const { return m_contentRect; } |
74 | 75 |
75 void clearLayerList() { m_layerList.clear(); } | |
76 Vector<CCLayerImpl*>& layerList() { return m_layerList; } | 76 Vector<CCLayerImpl*>& layerList() { return m_layerList; } |
| 77 void addContributingDelegatedRenderPassLayer(CCLayerImpl*); |
| 78 void clearLayerLists(); |
77 | 79 |
78 int owningLayerId() const; | 80 int owningLayerId() const; |
79 | 81 |
80 void resetPropertyChangedFlag() { m_surfacePropertyChanged = false; } | 82 void resetPropertyChangedFlag() { m_surfacePropertyChanged = false; } |
81 bool surfacePropertyChanged() const; | 83 bool surfacePropertyChanged() const; |
82 bool surfacePropertyChangedOnlyFromDescendant() const; | 84 bool surfacePropertyChangedOnlyFromDescendant() const; |
83 | 85 |
84 CCDamageTracker* damageTracker() const { return m_damageTracker.get(); } | 86 CCDamageTracker* damageTracker() const { return m_damageTracker.get(); } |
85 | 87 |
86 CCRenderPass::Id renderPassId(); | 88 CCRenderPass::Id renderPassId(); |
(...skipping 14 matching lines...) Expand all Loading... |
101 WebKit::WebTransformationMatrix m_screenSpaceTransform; | 103 WebKit::WebTransformationMatrix m_screenSpaceTransform; |
102 WebKit::WebTransformationMatrix m_replicaDrawTransform; | 104 WebKit::WebTransformationMatrix m_replicaDrawTransform; |
103 WebKit::WebTransformationMatrix m_replicaScreenSpaceTransform; | 105 WebKit::WebTransformationMatrix m_replicaScreenSpaceTransform; |
104 bool m_targetSurfaceTransformsAreAnimating; | 106 bool m_targetSurfaceTransformsAreAnimating; |
105 bool m_screenSpaceTransformsAreAnimating; | 107 bool m_screenSpaceTransformsAreAnimating; |
106 | 108 |
107 // Uses the space of the surface's target surface. | 109 // Uses the space of the surface's target surface. |
108 IntRect m_clipRect; | 110 IntRect m_clipRect; |
109 | 111 |
110 Vector<CCLayerImpl*> m_layerList; | 112 Vector<CCLayerImpl*> m_layerList; |
| 113 Vector<CCDelegatedRendererLayerImpl*> m_contributingDelegatedRenderPassLayer
List; |
111 | 114 |
112 // The nearest ancestor target surface that will contain the contents of thi
s surface, and that is going | 115 // The nearest ancestor target surface that will contain the contents of thi
s surface, and that is going |
113 // to move pixels within the surface (such as with a blur). This can point t
o itself. | 116 // to move pixels within the surface (such as with a blur). This can point t
o itself. |
114 CCRenderSurface* m_nearestAncestorThatMovesPixels; | 117 CCRenderSurface* m_nearestAncestorThatMovesPixels; |
115 | 118 |
116 OwnPtr<CCDamageTracker> m_damageTracker; | 119 OwnPtr<CCDamageTracker> m_damageTracker; |
117 | 120 |
118 // For CCLayerIteratorActions | 121 // For CCLayerIteratorActions |
119 int m_targetRenderSurfaceLayerIndexHistory; | 122 int m_targetRenderSurfaceLayerIndexHistory; |
120 int m_currentLayerIndexHistory; | 123 int m_currentLayerIndexHistory; |
121 | 124 |
122 friend struct CCLayerIteratorActions; | 125 friend struct CCLayerIteratorActions; |
123 }; | 126 }; |
124 | 127 |
125 } | 128 } |
126 #endif // USE(ACCELERATED_COMPOSITING) | 129 #endif // USE(ACCELERATED_COMPOSITING) |
127 | 130 |
128 #endif | 131 #endif |
OLD | NEW |