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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 283 |
286 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. | 284 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. |
287 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information | 285 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information |
288 // is not available and the update rect will remain empty. | 286 // is not available and the update rect will remain empty. |
289 // Note this rect is in layer space (not content space). | 287 // Note this rect is in layer space (not content space). |
290 FloatRect m_updateRect; | 288 FloatRect m_updateRect; |
291 | 289 |
292 scoped_refptr<LayerChromium> m_maskLayer; | 290 scoped_refptr<LayerChromium> m_maskLayer; |
293 | 291 |
294 // Constructs a CCLayerImpl of the correct runtime type for this LayerChromi
um type. | 292 // Constructs a CCLayerImpl of the correct runtime type for this LayerChromi
um type. |
295 virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl(); | 293 virtual scoped_ptr<CCLayerImpl> createCCLayerImpl(); |
296 int m_layerId; | 294 int m_layerId; |
297 | 295 |
298 private: | 296 private: |
299 friend class base::RefCounted<LayerChromium>; | 297 friend class base::RefCounted<LayerChromium>; |
300 | 298 |
301 void setParent(LayerChromium*); | 299 void setParent(LayerChromium*); |
302 bool hasAncestor(LayerChromium*) const; | 300 bool hasAncestor(LayerChromium*) const; |
303 bool descendantIsFixedToContainerLayer() const; | 301 bool descendantIsFixedToContainerLayer() const; |
304 | 302 |
305 size_t numChildren() const { return m_children.size(); } | 303 size_t numChildren() const { return m_children.size(); } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 381 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
384 WebKit::WebLayerScrollClient* m_layerScrollClient; | 382 WebKit::WebLayerScrollClient* m_layerScrollClient; |
385 }; | 383 }; |
386 | 384 |
387 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto
r<scoped_refptr<LayerChromium> >::iterator, void*); | 385 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto
r<scoped_refptr<LayerChromium> >::iterator, void*); |
388 | 386 |
389 } | 387 } |
390 #endif // USE(ACCELERATED_COMPOSITING) | 388 #endif // USE(ACCELERATED_COMPOSITING) |
391 | 389 |
392 #endif | 390 #endif |
OLD | NEW |