Chromium Code Reviews| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRaster Scale; } | 260 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRaster Scale; } |
| 261 void setAutomaticallyComputeRasterScale(bool); | 261 void setAutomaticallyComputeRasterScale(bool); |
| 262 | 262 |
| 263 void forceAutomaticRasterScaleToBeRecomputed(); | 263 void forceAutomaticRasterScaleToBeRecomputed(); |
| 264 | 264 |
| 265 // When true, the layer's contents are not scaled by the current page scale factor. | 265 // When true, the layer's contents are not scaled by the current page scale factor. |
| 266 // setBoundsContainPageScale recursively sets the value on all child layers. | 266 // setBoundsContainPageScale recursively sets the value on all child layers. |
| 267 void setBoundsContainPageScale(bool); | 267 void setBoundsContainPageScale(bool); |
| 268 bool boundsContainPageScale() const { return m_boundsContainPageScale; } | 268 bool boundsContainPageScale() const { return m_boundsContainPageScale; } |
| 269 | 269 |
| 270 // Returns 0 if none of the layer's descendants has content to draw, | 270 // This value does not consider the layer itself, only its descendants. |
| 271 // 1 if exactly one descendant has content to draw, or a number >1 | 271 virtual int numDescendantsThatDrawContent() { return m_numDescendantsThatDra wContent; } |
| 272 // (but necessary the exact number of descendants) otherwise. | 272 void setNumDescendantsThatDrawContent(int num) { m_numDescendantsThatDrawCon tent = num; } |
| 273 int descendantsDrawContent(); | |
| 274 | 273 |
| 275 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } | 274 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } |
| 276 | 275 |
| 277 // Set the priority of all desired textures in this layer. | 276 // Set the priority of all desired textures in this layer. |
| 278 virtual void setTexturePriorities(const PriorityCalculator&) { } | 277 virtual void setTexturePriorities(const PriorityCalculator&) { } |
| 279 | 278 |
| 280 bool addAnimation(scoped_ptr<ActiveAnimation>); | 279 bool addAnimation(scoped_ptr<ActiveAnimation>); |
| 281 void pauseAnimation(int animationId, double timeOffset); | 280 void pauseAnimation(int animationId, double timeOffset); |
| 282 void removeAnimation(int animationId); | 281 void removeAnimation(int animationId); |
| 283 | 282 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 // Uses target surface space. | 409 // Uses target surface space. |
| 411 gfx::Rect m_drawableContentRect; | 410 gfx::Rect m_drawableContentRect; |
| 412 gfx::Rect m_clipRect; | 411 gfx::Rect m_clipRect; |
| 413 | 412 |
| 414 // True if the layer is clipped by m_clipRect | 413 // True if the layer is clipped by m_clipRect |
| 415 bool m_isClipped; | 414 bool m_isClipped; |
| 416 | 415 |
| 417 float m_rasterScale; | 416 float m_rasterScale; |
| 418 bool m_automaticallyComputeRasterScale; | 417 bool m_automaticallyComputeRasterScale; |
| 419 bool m_boundsContainPageScale; | 418 bool m_boundsContainPageScale; |
| 419 bool m_numDescendantsThatDrawContent; | |
|
slavi
2012/12/03 21:33:42
That should be an int.
| |
| 420 | 420 |
| 421 gfx::Transform m_implTransform; | 421 gfx::Transform m_implTransform; |
| 422 | 422 |
| 423 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 423 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
| 424 WebKit::WebLayerScrollClient* m_layerScrollClient; | 424 WebKit::WebLayerScrollClient* m_layerScrollClient; |
| 425 }; | 425 }; |
| 426 | 426 |
| 427 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); | 427 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); |
| 428 | 428 |
| 429 } // namespace cc | 429 } // namespace cc |
| 430 | 430 |
| 431 #endif // CC_LAYER_H_ | 431 #endif // CC_LAYER_H_ |
| OLD | NEW |