| 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 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 const WebKit::WebTransformationMatrix& screenSpaceTransform() const { return
m_screenSpaceTransform; } | 223 const WebKit::WebTransformationMatrix& screenSpaceTransform() const { return
m_screenSpaceTransform; } |
| 224 void setScreenSpaceTransform(const WebKit::WebTransformationMatrix& matrix)
{ m_screenSpaceTransform = matrix; } | 224 void setScreenSpaceTransform(const WebKit::WebTransformationMatrix& matrix)
{ m_screenSpaceTransform = matrix; } |
| 225 const IntRect& drawableContentRect() const { return m_drawableContentRect; } | 225 const IntRect& drawableContentRect() const { return m_drawableContentRect; } |
| 226 void setDrawableContentRect(const IntRect& rect) { m_drawableContentRect = r
ect; } | 226 void setDrawableContentRect(const IntRect& rect) { m_drawableContentRect = r
ect; } |
| 227 // The contentsScale converts from logical, non-page-scaled pixels to target
pixels. | 227 // The contentsScale converts from logical, non-page-scaled pixels to target
pixels. |
| 228 // The contentsScale is 1 for the root layer as it is already in physical pi
xels. | 228 // The contentsScale is 1 for the root layer as it is already in physical pi
xels. |
| 229 float contentsScale() const { return m_contentsScale; } | 229 float contentsScale() const { return m_contentsScale; } |
| 230 void setContentsScale(float); | 230 void setContentsScale(float); |
| 231 | 231 |
| 232 // When true, the layer's contents are not scaled by the current page scale
factor. | 232 // When true, the layer's contents are not scaled by the current page scale
factor. |
| 233 // setBoundsContainPageScale recursively sets the value on all child layers. |
| 233 void setBoundsContainPageScale(bool); | 234 void setBoundsContainPageScale(bool); |
| 234 bool boundsContainPageScale() const { return m_boundsContainPageScale; } | 235 bool boundsContainPageScale() const { return m_boundsContainPageScale; } |
| 235 | 236 |
| 236 // Returns true if any of the layer's descendants has content to draw. | 237 // Returns true if any of the layer's descendants has content to draw. |
| 237 bool descendantDrawsContent(); | 238 bool descendantDrawsContent(); |
| 238 | 239 |
| 239 CCLayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } | 240 CCLayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } |
| 240 | 241 |
| 241 // Set the priority of all desired textures in this layer. | 242 // Set the priority of all desired textures in this layer. |
| 242 virtual void setTexturePriorities(const CCPriorityCalculator&) { } | 243 virtual void setTexturePriorities(const CCPriorityCalculator&) { } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 264 virtual ScrollbarLayerChromium* toScrollbarLayerChromium() { return 0; } | 265 virtual ScrollbarLayerChromium* toScrollbarLayerChromium() { return 0; } |
| 265 | 266 |
| 266 protected: | 267 protected: |
| 267 friend class CCLayerImpl; | 268 friend class CCLayerImpl; |
| 268 friend class TreeSynchronizer; | 269 friend class TreeSynchronizer; |
| 269 | 270 |
| 270 LayerChromium(); | 271 LayerChromium(); |
| 271 | 272 |
| 272 void setNeedsCommit(); | 273 void setNeedsCommit(); |
| 273 | 274 |
| 275 IntRect layerRectToContentRect(const WebKit::WebRect& layerRect); |
| 276 |
| 274 // This flag is set when layer need repainting/updating. | 277 // This flag is set when layer need repainting/updating. |
| 275 bool m_needsDisplay; | 278 bool m_needsDisplay; |
| 276 | 279 |
| 277 // Tracks whether this layer may have changed stacking order with its siblin
gs. | 280 // Tracks whether this layer may have changed stacking order with its siblin
gs. |
| 278 bool m_stackingOrderChanged; | 281 bool m_stackingOrderChanged; |
| 279 | 282 |
| 280 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. | 283 // The update rect is the region of the compositor resource that was actuall
y updated by the compositor. |
| 281 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information | 284 // For layers that may do updating outside the compositor's control (i.e. pl
ugin layers), this information |
| 282 // is not available and the update rect will remain empty. | 285 // is not available and the update rect will remain empty. |
| 283 // Note this rect is in layer space (not content space). | 286 // Note this rect is in layer space (not content space). |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 376 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
| 374 WebKit::WebLayerScrollClient* m_layerScrollClient; | 377 WebKit::WebLayerScrollClient* m_layerScrollClient; |
| 375 }; | 378 }; |
| 376 | 379 |
| 377 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr
omium> >::iterator, void*); | 380 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr
omium> >::iterator, void*); |
| 378 | 381 |
| 379 } | 382 } |
| 380 #endif // USE(ACCELERATED_COMPOSITING) | 383 #endif // USE(ACCELERATED_COMPOSITING) |
| 381 | 384 |
| 382 #endif | 385 #endif |
| OLD | NEW |