| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void setCompositingLayersNeedRebuild(bool needRebuild = true); | 115 void setCompositingLayersNeedRebuild(bool needRebuild = true); |
| 116 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRe
build; } | 116 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRe
build; } |
| 117 | 117 |
| 118 // Controls whether or not to consult geometry when deciding which layers ne
ed | 118 // Controls whether or not to consult geometry when deciding which layers ne
ed |
| 119 // to be composited. Defaults to true. | 119 // to be composited. Defaults to true. |
| 120 void setCompositingConsultsOverlap(bool b) { m_compositingConsultsOverlap =
b; } | 120 void setCompositingConsultsOverlap(bool b) { m_compositingConsultsOverlap =
b; } |
| 121 bool compositingConsultsOverlap() const { return m_compositingConsultsOverla
p; } | 121 bool compositingConsultsOverlap() const { return m_compositingConsultsOverla
p; } |
| 122 | 122 |
| 123 // Called when something outside WebKit affects the visible rect (e.g. deleg
ated scrolling). Might schedule a layer flush. | 123 // Called when something outside WebKit affects the visible rect (e.g. deleg
ated scrolling). Might schedule a layer flush. |
| 124 void didChangeVisibleRect(); | 124 void didChangeVisibleRect(); |
| 125 | 125 |
| 126 void updateLayoutDependentState(); |
| 127 |
| 126 // Rebuild the tree of compositing layers | 128 // Rebuild the tree of compositing layers |
| 127 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); | 129 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); |
| 128 | 130 |
| 129 // Update the compositing state of the given layer. Returns true if that sta
te changed. | 131 // Update the compositing state of the given layer. Returns true if that sta
te changed. |
| 130 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; | 132 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; |
| 131 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); | 133 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); |
| 132 | 134 |
| 133 // Update the geometry for compositing children of compositingAncestor. | 135 // Update the geometry for compositing children of compositingAncestor. |
| 134 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); | 136 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); |
| 135 | 137 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 StickyPositionViewportConstraints computeStickyViewportConstraints(RenderLay
er*) const; | 331 StickyPositionViewportConstraints computeStickyViewportConstraints(RenderLay
er*) const; |
| 330 | 332 |
| 331 bool requiresHorizontalScrollbarLayer() const; | 333 bool requiresHorizontalScrollbarLayer() const; |
| 332 bool requiresVerticalScrollbarLayer() const; | 334 bool requiresVerticalScrollbarLayer() const; |
| 333 bool requiresScrollCornerLayer() const; | 335 bool requiresScrollCornerLayer() const; |
| 334 #if ENABLE(RUBBER_BANDING) | 336 #if ENABLE(RUBBER_BANDING) |
| 335 bool requiresOverhangAreasLayer() const; | 337 bool requiresOverhangAreasLayer() const; |
| 336 bool requiresContentShadowLayer() const; | 338 bool requiresContentShadowLayer() const; |
| 337 #endif | 339 #endif |
| 338 | 340 |
| 341 void updateDescendantsAreContiguousInStackingOrderRecursive(RenderLayer*); |
| 342 void updateNeedsCompositedScrolling(RenderLayer*); |
| 343 |
| 339 #if !LOG_DISABLED | 344 #if !LOG_DISABLED |
| 340 const char* logReasonsForCompositing(const RenderLayer*); | 345 const char* logReasonsForCompositing(const RenderLayer*); |
| 341 void logLayerInfo(const RenderLayer*, int depth); | 346 void logLayerInfo(const RenderLayer*, int depth); |
| 342 #endif | 347 #endif |
| 343 | 348 |
| 344 private: | 349 private: |
| 345 RenderView* m_renderView; | 350 RenderView* m_renderView; |
| 346 OwnPtr<GraphicsLayer> m_rootContentLayer; | 351 OwnPtr<GraphicsLayer> m_rootContentLayer; |
| 347 | 352 |
| 348 bool m_hasAcceleratedCompositing; | 353 bool m_hasAcceleratedCompositing; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. | 400 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. |
| 396 double m_obligatoryBackingStoreBytes; | 401 double m_obligatoryBackingStoreBytes; |
| 397 double m_secondaryBackingStoreBytes; | 402 double m_secondaryBackingStoreBytes; |
| 398 #endif | 403 #endif |
| 399 }; | 404 }; |
| 400 | 405 |
| 401 | 406 |
| 402 } // namespace WebCore | 407 } // namespace WebCore |
| 403 | 408 |
| 404 #endif // RenderLayerCompositor_h | 409 #endif // RenderLayerCompositor_h |
| OLD | NEW |