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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void GraphicsLayerUpdater::update(RenderLayer& layer, Vector<RenderLayer*>& laye
rsNeedingPaintInvalidation) | 84 void GraphicsLayerUpdater::update(RenderLayer& layer, Vector<RenderLayer*>& laye
rsNeedingPaintInvalidation) |
85 { | 85 { |
86 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::update"); | 86 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::update"); |
87 updateRecursive(layer, DoNotForceUpdate, UpdateContext(), layersNeedingPaint
Invalidation); | 87 updateRecursive(layer, DoNotForceUpdate, UpdateContext(), layersNeedingPaint
Invalidation); |
88 layer.compositor()->updateRootLayerPosition(); | 88 layer.compositor()->updateRootLayerPosition(); |
89 } | 89 } |
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 CompositedLayerMappingPtr 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)) { | 100 if (mapping->updateRequiresOwnBackingStoreForAncestorReasons(composi
tingContainer)) { |
101 layersNeedingPaintInvalidation.append(&layer); | 101 layersNeedingPaintInvalidation.append(&layer); |
102 updateType = ForceUpdate; | 102 updateType = ForceUpdate; |
103 } | 103 } |
104 | 104 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 if (layer.hasCompositedLayerMapping()) | 136 if (layer.hasCompositedLayerMapping()) |
137 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); | 137 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); |
138 | 138 |
139 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) | 139 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) |
140 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 140 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
141 } | 141 } |
142 | 142 |
143 #endif | 143 #endif |
144 | 144 |
145 } // namespace blink | 145 } // namespace blink |
OLD | NEW |