| 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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "cc/layer_animation_controller.h" | 10 #include "cc/layer_animation_controller.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRaster
Scale; } | 259 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRaster
Scale; } |
| 260 void setAutomaticallyComputeRasterScale(bool); | 260 void setAutomaticallyComputeRasterScale(bool); |
| 261 | 261 |
| 262 void forceAutomaticRasterScaleToBeRecomputed(); | 262 void forceAutomaticRasterScaleToBeRecomputed(); |
| 263 | 263 |
| 264 // When true, the layer's contents are not scaled by the current page scale
factor. | 264 // When true, the layer's contents are not scaled by the current page scale
factor. |
| 265 // setBoundsContainPageScale recursively sets the value on all child layers. | 265 // setBoundsContainPageScale recursively sets the value on all child layers. |
| 266 void setBoundsContainPageScale(bool); | 266 void setBoundsContainPageScale(bool); |
| 267 bool boundsContainPageScale() const { return m_boundsContainPageScale; } | 267 bool boundsContainPageScale() const { return m_boundsContainPageScale; } |
| 268 | 268 |
| 269 // Returns true if any of the layer's descendants has content to draw. | |
| 270 bool descendantDrawsContent(); | |
| 271 | |
| 272 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } | 269 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } |
| 273 | 270 |
| 274 // Set the priority of all desired textures in this layer. | 271 // Set the priority of all desired textures in this layer. |
| 275 virtual void setTexturePriorities(const PriorityCalculator&) { } | 272 virtual void setTexturePriorities(const PriorityCalculator&) { } |
| 276 | 273 |
| 277 bool addAnimation(scoped_ptr<ActiveAnimation>); | 274 bool addAnimation(scoped_ptr<ActiveAnimation>); |
| 278 void pauseAnimation(int animationId, double timeOffset); | 275 void pauseAnimation(int animationId, double timeOffset); |
| 279 void removeAnimation(int animationId); | 276 void removeAnimation(int animationId); |
| 280 | 277 |
| 281 void suspendAnimations(double monotonicTime); | 278 void suspendAnimations(double monotonicTime); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 416 |
| 420 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 417 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
| 421 WebKit::WebLayerScrollClient* m_layerScrollClient; | 418 WebKit::WebLayerScrollClient* m_layerScrollClient; |
| 422 }; | 419 }; |
| 423 | 420 |
| 424 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 421 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
| 425 | 422 |
| 426 } // namespace cc | 423 } // namespace cc |
| 427 | 424 |
| 428 #endif // CC_LAYER_H_ | 425 #endif // CC_LAYER_H_ |
| OLD | NEW |