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 // PATCH 2 |
| 121 |
| 122 // Iterates through the RenderLayer tree, if necessary, updating properties |
| 123 // required for determining if compositing is necessary. |
| 124 void updateCompositingRequirementsState(CompositingUpdateType, RenderLayer*
updateRoot = 0); |
| 125 void setNeedsUpdateCompositingRequirementsState(bool needsUpdate = true) { m
_needsUpdateCompositingRequirementsState = needsUpdate; } |
| 126 |
120 // Rebuild the tree of compositing layers | 127 // Rebuild the tree of compositing layers |
121 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); | 128 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot
= 0); |
122 | 129 |
123 // Update the compositing state of the given layer. Returns true if that sta
te changed. | 130 // Update the compositing state of the given layer. Returns true if that sta
te changed. |
124 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; | 131 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChan
geWillRepaintLater }; |
125 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); | 132 bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = Co
mpositingChangeRepaintNow); |
126 | 133 |
127 // Update the geometry for compositing children of compositingAncestor. | 134 // Update the geometry for compositing children of compositingAncestor. |
128 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); | 135 void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, R
enderLayer*, bool compositedChildrenOnly); |
129 | 136 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 bool m_showRepaintCounter; | 350 bool m_showRepaintCounter; |
344 | 351 |
345 // When true, we have to wait until layout has happened before we can decide
whether to enter compositing mode, | 352 // 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. | 353 // because only then do we know the final size of plugins and iframes. |
347 mutable bool m_reevaluateCompositingAfterLayout; | 354 mutable bool m_reevaluateCompositingAfterLayout; |
348 | 355 |
349 bool m_compositing; | 356 bool m_compositing; |
350 bool m_compositingLayersNeedRebuild; | 357 bool m_compositingLayersNeedRebuild; |
351 bool m_forceCompositingMode; | 358 bool m_forceCompositingMode; |
352 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information
(e.g. layer sizes and positions) | 359 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information
(e.g. layer sizes and positions) |
| 360 bool m_needsUpdateCompositingRequirementsState; |
353 | 361 |
354 bool m_isTrackingRepaints; // Used for testing. | 362 bool m_isTrackingRepaints; // Used for testing. |
355 | 363 |
356 RootLayerAttachment m_rootLayerAttachment; | 364 RootLayerAttachment m_rootLayerAttachment; |
357 | 365 |
358 // Enclosing clipping layer for iframe content | 366 // Enclosing clipping layer for iframe content |
359 OwnPtr<GraphicsLayer> m_clipLayer; | 367 OwnPtr<GraphicsLayer> m_clipLayer; |
360 OwnPtr<GraphicsLayer> m_scrollLayer; | 368 OwnPtr<GraphicsLayer> m_scrollLayer; |
361 | 369 |
362 HashSet<RenderLayer*> m_viewportConstrainedLayers; | 370 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. | 390 int m_secondaryCompositedLayerCount; // count of layers that have to be comp
osited because of stacking or overlap. |
383 double m_obligatoryBackingStoreBytes; | 391 double m_obligatoryBackingStoreBytes; |
384 double m_secondaryBackingStoreBytes; | 392 double m_secondaryBackingStoreBytes; |
385 #endif | 393 #endif |
386 }; | 394 }; |
387 | 395 |
388 | 396 |
389 } // namespace WebCore | 397 } // namespace WebCore |
390 | 398 |
391 #endif // RenderLayerCompositor_h | 399 #endif // RenderLayerCompositor_h |
OLD | NEW |