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