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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Copy the accelerated compositing related flags from Settings | 109 // Copy the accelerated compositing related flags from Settings |
110 void cacheAcceleratedCompositingFlags(); | 110 void cacheAcceleratedCompositingFlags(); |
111 | 111 |
112 // Called when the layer hierarchy needs to be updated (compositing layers h
ave been | 112 // Called when the layer hierarchy needs to be updated (compositing layers h
ave been |
113 // created, destroyed or re-parented). | 113 // created, destroyed or re-parented). |
114 void setCompositingLayersNeedRebuild(bool needRebuild = true); | 114 void setCompositingLayersNeedRebuild(bool needRebuild = true); |
115 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRe
build; } | 115 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRe
build; } |
116 | 116 |
117 // Called when something outside WebKit affects the visible rect (e.g. deleg
ated scrolling). Might schedule a layer flush. | 117 // Called when something outside WebKit affects the visible rect (e.g. deleg
ated scrolling). Might schedule a layer flush. |
118 void didChangeVisibleRect(); | 118 void didChangeVisibleRect(); |
119 | 119 |
| 120 // Iterates through the RenderLayer tree, if necessary, updating properties |
| 121 // required for determining if compositing is necessary. |
| 122 void updateCompositingRequirementsState(RenderLayer* updateRoot = 0); |
| 123 void setNeedsUpdateCompositingRequirementsState(bool needsUpdate = true) { m
_needsUpdateCompositingRequirementsState = needsUpdate; } |
| 124 |
120 // Rebuild the tree of compositing layers | 125 // Rebuild the tree of compositing layers |
121 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); | 126 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); |
122 | 127 |
123 // Update the compositing state of the given layer. Returns true if that sta
te changed. | 128 // Update the compositing state of the given layer. Returns true if that sta
te changed. |
124 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; | 129 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; |
125 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); | 130 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); |
126 | 131 |
127 // Update the geometry for compositing children of compositingAncestor. | 132 // Update the geometry for compositing children of compositingAncestor. |
128 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); | 133 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); |
129 | 134 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 bool m_showRepaintCounter; | 348 bool m_showRepaintCounter; |
344 | 349 |
345 // When true, we have to wait until layout has happened before we can decide
whether to enter compositing mode, | 350 // When true, we have to wait until layout has happened before we can decide
whether to enter compositing mode, |
346 // because only then do we know the final size of plugins and iframes. | 351 // because only then do we know the final size of plugins and iframes. |
347 mutable bool m_reevaluateCompositingAfterLayout; | 352 mutable bool m_reevaluateCompositingAfterLayout; |
348 | 353 |
349 bool m_compositing; | 354 bool m_compositing; |
350 bool m_compositingLayersNeedRebuild; | 355 bool m_compositingLayersNeedRebuild; |
351 bool m_forceCompositingMode; | 356 bool m_forceCompositingMode; |
352 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information
(e.g. layer sizes and positions) | 357 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information
(e.g. layer sizes and positions) |
| 358 bool m_needsUpdateCompositingRequirementsState; |
353 | 359 |
354 bool m_isTrackingRepaints; // Used for testing. | 360 bool m_isTrackingRepaints; // Used for testing. |
355 | 361 |
356 RootLayerAttachment m_rootLayerAttachment; | 362 RootLayerAttachment m_rootLayerAttachment; |
357 | 363 |
358 // Enclosing clipping layer for iframe content | 364 // Enclosing clipping layer for iframe content |
359 OwnPtr<GraphicsLayer> m_clipLayer; | 365 OwnPtr<GraphicsLayer> m_clipLayer; |
360 OwnPtr<GraphicsLayer> m_scrollLayer; | 366 OwnPtr<GraphicsLayer> m_scrollLayer; |
361 | 367 |
362 HashSet<RenderLayer*> m_viewportConstrainedLayers; | 368 HashSet<RenderLayer*> m_viewportConstrainedLayers; |
(...skipping 19 matching lines...) Expand all Loading... |
382 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. | 388 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. |
383 double m_obligatoryBackingStoreBytes; | 389 double m_obligatoryBackingStoreBytes; |
384 double m_secondaryBackingStoreBytes; | 390 double m_secondaryBackingStoreBytes; |
385 #endif | 391 #endif |
386 }; | 392 }; |
387 | 393 |
388 | 394 |
389 } // namespace WebCore | 395 } // namespace WebCore |
390 | 396 |
391 #endif // RenderLayerCompositor_h | 397 #endif // RenderLayerCompositor_h |
OLD | NEW |