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 true if any of the layer's descendants has content to draw. | 270 // Returns 0 if none of the layer's descendants has content to draw, |
271 bool descendantDrawsContent(); | 271 // 1 if exactly one descendant has content to draw, or a number >1 |
| 272 // (but necessary the exact number of descendants) otherwise. |
| 273 int descendantsDrawContent(); |
272 | 274 |
273 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } | 275 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } |
274 | 276 |
275 // Set the priority of all desired textures in this layer. | 277 // Set the priority of all desired textures in this layer. |
276 virtual void setTexturePriorities(const PriorityCalculator&) { } | 278 virtual void setTexturePriorities(const PriorityCalculator&) { } |
277 | 279 |
278 bool addAnimation(scoped_ptr<ActiveAnimation>); | 280 bool addAnimation(scoped_ptr<ActiveAnimation>); |
279 void pauseAnimation(int animationId, double timeOffset); | 281 void pauseAnimation(int animationId, double timeOffset); |
280 void removeAnimation(int animationId); | 282 void removeAnimation(int animationId); |
281 | 283 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 422 |
421 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 423 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
422 WebKit::WebLayerScrollClient* m_layerScrollClient; | 424 WebKit::WebLayerScrollClient* m_layerScrollClient; |
423 }; | 425 }; |
424 | 426 |
425 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*); |
426 | 428 |
427 } // namespace cc | 429 } // namespace cc |
428 | 430 |
429 #endif // CC_LAYER_H_ | 431 #endif // CC_LAYER_H_ |
OLD | NEW |