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