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 #ifndef CC_LAYER_H_ | 5 #ifndef CC_LAYER_H_ |
6 #define CC_LAYER_H_ | 6 #define CC_LAYER_H_ |
7 | 7 |
8 #include <public/WebFilterOperations.h> | 8 #include <public/WebFilterOperations.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 class WebLayerScrollClient; | 28 class WebLayerScrollClient; |
29 } | 29 } |
30 | 30 |
31 namespace cc { | 31 namespace cc { |
32 | 32 |
33 class ActiveAnimation; | 33 class ActiveAnimation; |
34 struct AnimationEvent; | 34 struct AnimationEvent; |
35 class LayerAnimationDelegate; | 35 class LayerAnimationDelegate; |
36 class LayerImpl; | 36 class LayerImpl; |
37 class LayerTreeHost; | 37 class LayerTreeHost; |
| 38 class LayerTreeHostImpl; |
38 class PriorityCalculator; | 39 class PriorityCalculator; |
39 class ResourceUpdateQueue; | 40 class ResourceUpdateQueue; |
40 class ScrollbarLayer; | 41 class ScrollbarLayer; |
41 struct AnimationEvent; | 42 struct AnimationEvent; |
42 struct RenderingStats; | 43 struct RenderingStats; |
43 | 44 |
44 // Base class for composited layers. Special layer types are derived from | 45 // Base class for composited layers. Special layer types are derived from |
45 // this class. | 46 // this class. |
46 class CC_EXPORT Layer : public base::RefCounted<Layer>, public LayerAnimationCon
trollerClient { | 47 class CC_EXPORT Layer : public base::RefCounted<Layer>, public LayerAnimationCon
trollerClient { |
47 public: | 48 public: |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 301 |
301 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. | 302 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. |
302 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information | 303 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information |
303 // is not available and the update rect will remain empty. | 304 // is not available and the update rect will remain empty. |
304 // Note this rect is in layer space (not content space). | 305 // Note this rect is in layer space (not content space). |
305 gfx::RectF m_updateRect; | 306 gfx::RectF m_updateRect; |
306 | 307 |
307 scoped_refptr<Layer> m_maskLayer; | 308 scoped_refptr<Layer> m_maskLayer; |
308 | 309 |
309 // Constructs a LayerImpl of the correct runtime type for this Layer type. | 310 // Constructs a LayerImpl of the correct runtime type for this Layer type. |
310 virtual scoped_ptr<LayerImpl> createLayerImpl(); | 311 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeHostImpl* hostImpl); |
311 int m_layerId; | 312 int m_layerId; |
312 | 313 |
313 private: | 314 private: |
314 friend class base::RefCounted<Layer>; | 315 friend class base::RefCounted<Layer>; |
315 | 316 |
316 void setParent(Layer*); | 317 void setParent(Layer*); |
317 bool hasAncestor(Layer*) const; | 318 bool hasAncestor(Layer*) const; |
318 bool descendantIsFixedToContainerLayer() const; | 319 bool descendantIsFixedToContainerLayer() const; |
319 | 320 |
320 size_t numChildren() const { return m_children.size(); } | 321 size_t numChildren() const { return m_children.size(); } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 WebKit::WebLayerScrollClient* m_layerScrollClient; | 386 WebKit::WebLayerScrollClient* m_layerScrollClient; |
386 | 387 |
387 DrawProperties<Layer, RenderSurface> m_drawProperties; | 388 DrawProperties<Layer, RenderSurface> m_drawProperties; |
388 }; | 389 }; |
389 | 390 |
390 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 391 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
391 | 392 |
392 } // namespace cc | 393 } // namespace cc |
393 | 394 |
394 #endif // CC_LAYER_H_ | 395 #endif // CC_LAYER_H_ |
OLD | NEW |