OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update
Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva
lidation) | 91 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update
Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva
lidation) |
92 { | 92 { |
93 if (layer.hasCompositedLayerMapping()) { | 93 if (layer.hasCompositedLayerMapping()) { |
94 CompositedLayerMapping* mapping = layer.compositedLayerMapping(); | 94 CompositedLayerMapping* mapping = layer.compositedLayerMapping(); |
95 | 95 |
96 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) { | 96 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) { |
97 const RenderLayer* compositingContainer = context.compositingContain
er(layer); | 97 const RenderLayer* compositingContainer = context.compositingContain
er(layer); |
98 ASSERT(compositingContainer == layer.enclosingLayerWithCompositedLay
erMapping(ExcludeSelf)); | 98 ASSERT(compositingContainer == layer.enclosingLayerWithCompositedLay
erMapping(ExcludeSelf)); |
99 | 99 |
100 if (mapping->updateRequiresOwnBackingStoreForAncestorReasons(composi
tingContainer)) { | |
101 TRACE_LAYER_INVALIDATION(&layer, InspectorLayerInvalidationTrack
ingEvent::AncestorRequiresNewLayer); | |
102 layersNeedingPaintInvalidation.append(&layer); | |
103 updateType = ForceUpdate; | |
104 } | |
105 | |
106 if (mapping->updateGraphicsLayerConfiguration()) | 100 if (mapping->updateGraphicsLayerConfiguration()) |
107 m_needsRebuildTree = true; | 101 m_needsRebuildTree = true; |
108 | 102 |
109 mapping->updateGraphicsLayerGeometry(compositingContainer, context.c
ompositingStackingContext(), layersNeedingPaintInvalidation); | 103 mapping->updateGraphicsLayerGeometry(compositingContainer, context.c
ompositingStackingContext(), layersNeedingPaintInvalidation); |
110 | 104 |
111 if (mapping->hasUnpositionedOverflowControlsLayers()) | 105 if (mapping->hasUnpositionedOverflowControlsLayers()) |
112 layer.scrollableArea()->positionOverflowControls(IntSize()); | 106 layer.scrollableArea()->positionOverflowControls(IntSize()); |
113 | 107 |
114 updateType = mapping->updateTypeForChildren(updateType); | 108 updateType = mapping->updateTypeForChildren(updateType); |
115 mapping->clearNeedsGraphicsLayerUpdate(); | 109 mapping->clearNeedsGraphicsLayerUpdate(); |
(...skipping 12 matching lines...) Expand all Loading... |
128 if (layer.hasCompositedLayerMapping()) | 122 if (layer.hasCompositedLayerMapping()) |
129 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); | 123 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); |
130 | 124 |
131 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) | 125 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) |
132 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 126 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
133 } | 127 } |
134 | 128 |
135 #endif | 129 #endif |
136 | 130 |
137 } // namespace blink | 131 } // namespace blink |
OLD | NEW |