| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 bool preserves3D() const { return m_preserves3D; } | 191 bool preserves3D() const { return m_preserves3D; } |
| 192 | 192 |
| 193 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us
eParentBackfaceVisibility = useParentBackfaceVisibility; } | 193 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us
eParentBackfaceVisibility = useParentBackfaceVisibility; } |
| 194 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil
ity; } | 194 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil
ity; } |
| 195 | 195 |
| 196 void setUseLCDText(bool); | 196 void setUseLCDText(bool); |
| 197 bool useLCDText() const { return m_useLCDText; } | 197 bool useLCDText() const { return m_useLCDText; } |
| 198 | 198 |
| 199 virtual void setLayerTreeHost(LayerTreeHost*); | 199 virtual void setLayerTreeHost(LayerTreeHost*); |
| 200 | 200 |
| 201 bool hasDelegatedContent() const { return false; } |
| 201 bool hasContributingDelegatedRenderPasses() const { return false; } | 202 bool hasContributingDelegatedRenderPasses() const { return false; } |
| 202 | 203 |
| 203 void setIsDrawable(bool); | 204 void setIsDrawable(bool); |
| 204 | 205 |
| 205 void setReplicaLayer(Layer*); | 206 void setReplicaLayer(Layer*); |
| 206 Layer* replicaLayer() { return m_replicaLayer.get(); } | 207 Layer* replicaLayer() { return m_replicaLayer.get(); } |
| 207 const Layer* replicaLayer() const { return m_replicaLayer.get(); } | 208 const Layer* replicaLayer() const { return m_replicaLayer.get(); } |
| 208 | 209 |
| 209 bool hasMask() const { return !!m_maskLayer; } | 210 bool hasMask() const { return !!m_maskLayer; } |
| 210 bool hasReplica() const { return !!m_replicaLayer; } | 211 bool hasReplica() const { return !!m_replicaLayer; } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRaster
Scale; } | 243 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRaster
Scale; } |
| 243 void setAutomaticallyComputeRasterScale(bool); | 244 void setAutomaticallyComputeRasterScale(bool); |
| 244 | 245 |
| 245 void forceAutomaticRasterScaleToBeRecomputed(); | 246 void forceAutomaticRasterScaleToBeRecomputed(); |
| 246 | 247 |
| 247 // When true, the layer's contents are not scaled by the current page scale
factor. | 248 // When true, the layer's contents are not scaled by the current page scale
factor. |
| 248 // setBoundsContainPageScale recursively sets the value on all child layers. | 249 // setBoundsContainPageScale recursively sets the value on all child layers. |
| 249 void setBoundsContainPageScale(bool); | 250 void setBoundsContainPageScale(bool); |
| 250 bool boundsContainPageScale() const { return m_boundsContainPageScale; } | 251 bool boundsContainPageScale() const { return m_boundsContainPageScale; } |
| 251 | 252 |
| 252 // Returns 0 if none of the layer's descendants has content to draw, | |
| 253 // 1 if exactly one descendant has content to draw, or a number >1 | |
| 254 // (but necessary the exact number of descendants) otherwise. | |
| 255 int descendantsDrawContent(); | |
| 256 | |
| 257 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } | 253 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } |
| 258 | 254 |
| 259 // Set the priority of all desired textures in this layer. | 255 // Set the priority of all desired textures in this layer. |
| 260 virtual void setTexturePriorities(const PriorityCalculator&) { } | 256 virtual void setTexturePriorities(const PriorityCalculator&) { } |
| 261 | 257 |
| 262 bool addAnimation(scoped_ptr<ActiveAnimation>); | 258 bool addAnimation(scoped_ptr<ActiveAnimation>); |
| 263 void pauseAnimation(int animationId, double timeOffset); | 259 void pauseAnimation(int animationId, double timeOffset); |
| 264 void removeAnimation(int animationId); | 260 void removeAnimation(int animationId); |
| 265 | 261 |
| 266 void suspendAnimations(double monotonicTime); | 262 void suspendAnimations(double monotonicTime); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 WebKit::WebLayerScrollClient* m_layerScrollClient; | 387 WebKit::WebLayerScrollClient* m_layerScrollClient; |
| 392 | 388 |
| 393 DrawProperties<Layer, RenderSurface> m_drawProperties; | 389 DrawProperties<Layer, RenderSurface> m_drawProperties; |
| 394 }; | 390 }; |
| 395 | 391 |
| 396 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 392 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
| 397 | 393 |
| 398 } // namespace cc | 394 } // namespace cc |
| 399 | 395 |
| 400 #endif // CC_LAYER_H_ | 396 #endif // CC_LAYER_H_ |
| OLD | NEW |