OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 LayerChromium_h | 6 #ifndef LayerChromium_h |
7 #define LayerChromium_h | 7 #define LayerChromium_h |
8 | 8 |
9 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "CCLayerAnimationController.h" | 12 #include "CCLayerAnimationController.h" |
13 #include "CCOcclusionTracker.h" | 13 #include "CCOcclusionTracker.h" |
| 14 #include "CCPrioritizedTexture.h" |
14 #include "FloatPoint.h" | 15 #include "FloatPoint.h" |
15 #include "Region.h" | 16 #include "Region.h" |
16 #include "RenderSurfaceChromium.h" | 17 #include "RenderSurfaceChromium.h" |
17 #include "SkColor.h" | 18 #include "SkColor.h" |
18 #include <public/WebFilterOperations.h> | 19 #include <public/WebFilterOperations.h> |
19 #include <public/WebTransformationMatrix.h> | 20 #include <public/WebTransformationMatrix.h> |
20 #include <string> | 21 #include <string> |
21 #include <vector> | 22 #include <vector> |
| 23 #include <wtf/OwnPtr.h> |
| 24 #include <wtf/PassOwnPtr.h> |
22 | 25 |
23 namespace WebKit { | 26 namespace WebKit { |
24 class WebAnimationDelegate; | 27 class WebAnimationDelegate; |
25 class WebLayerScrollClient; | 28 class WebLayerScrollClient; |
26 } | 29 } |
27 | 30 |
28 namespace cc { | 31 namespace cc { |
29 | 32 |
30 class CCActiveAnimation; | 33 class CCActiveAnimation; |
31 struct CCAnimationEvent; | 34 struct CCAnimationEvent; |
32 class CCLayerAnimationDelegate; | 35 class CCLayerAnimationDelegate; |
33 class CCLayerImpl; | 36 class CCLayerImpl; |
34 class CCLayerTreeHost; | 37 class CCLayerTreeHost; |
35 class CCPriorityCalculator; | |
36 class CCTextureUpdateQueue; | 38 class CCTextureUpdateQueue; |
37 class ScrollbarLayerChromium; | 39 class ScrollbarLayerChromium; |
38 struct CCAnimationEvent; | 40 struct CCAnimationEvent; |
39 struct CCRenderingStats; | 41 struct CCRenderingStats; |
40 | 42 |
41 // Base class for composited layers. Special layer types are derived from | 43 // Base class for composited layers. Special layer types are derived from |
42 // this class. | 44 // this class. |
43 class LayerChromium : public base::RefCounted<LayerChromium>, public CCLayerAnim
ationControllerClient { | 45 class LayerChromium : public base::RefCounted<LayerChromium>, public CCLayerAnim
ationControllerClient { |
44 public: | 46 public: |
45 typedef std::vector<scoped_refptr<LayerChromium> > LayerList; | 47 typedef std::vector<scoped_refptr<LayerChromium> > LayerList; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 284 |
283 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. | 285 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. |
284 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information | 286 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information |
285 // is not available and the update rect will remain empty. | 287 // is not available and the update rect will remain empty. |
286 // Note this rect is in layer space (not content space). | 288 // Note this rect is in layer space (not content space). |
287 FloatRect m_updateRect; | 289 FloatRect m_updateRect; |
288 | 290 |
289 scoped_refptr<LayerChromium> m_maskLayer; | 291 scoped_refptr<LayerChromium> m_maskLayer; |
290 | 292 |
291 // Constructs a CCLayerImpl of the correct runtime type for this LayerChromi
um type. | 293 // Constructs a CCLayerImpl of the correct runtime type for this LayerChromi
um type. |
292 virtual scoped_ptr<CCLayerImpl> createCCLayerImpl(); | 294 virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl(); |
293 int m_layerId; | 295 int m_layerId; |
294 | 296 |
295 private: | 297 private: |
296 friend class base::RefCounted<LayerChromium>; | 298 friend class base::RefCounted<LayerChromium>; |
297 | 299 |
298 void setParent(LayerChromium*); | 300 void setParent(LayerChromium*); |
299 bool hasAncestor(LayerChromium*) const; | 301 bool hasAncestor(LayerChromium*) const; |
300 bool descendantIsFixedToContainerLayer() const; | 302 bool descendantIsFixedToContainerLayer() const; |
301 | 303 |
302 size_t numChildren() const { return m_children.size(); } | 304 size_t numChildren() const { return m_children.size(); } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 380 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
379 WebKit::WebLayerScrollClient* m_layerScrollClient; | 381 WebKit::WebLayerScrollClient* m_layerScrollClient; |
380 }; | 382 }; |
381 | 383 |
382 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto
r<scoped_refptr<LayerChromium> >::iterator, void*); | 384 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto
r<scoped_refptr<LayerChromium> >::iterator, void*); |
383 | 385 |
384 } | 386 } |
385 #endif // USE(ACCELERATED_COMPOSITING) | 387 #endif // USE(ACCELERATED_COMPOSITING) |
386 | 388 |
387 #endif | 389 #endif |
OLD | NEW |