| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update
Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva
lidation) | 86 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update
Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva
lidation) |
| 87 { | 87 { |
| 88 if (layer.hasCompositedLayerMapping()) { | 88 if (layer.hasCompositedLayerMapping()) { |
| 89 CompositedLayerMappingPtr mapping = layer.compositedLayerMapping(); | 89 CompositedLayerMappingPtr mapping = layer.compositedLayerMapping(); |
| 90 | 90 |
| 91 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) { | 91 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) { |
| 92 const RenderLayer* compositingContainer = context.compositingContain
er(layer); | 92 const RenderLayer* compositingContainer = context.compositingContain
er(layer); |
| 93 ASSERT(compositingContainer == layer.ancestorCompositingLayer()); | 93 ASSERT(compositingContainer == layer.ancestorCompositingLayer()); |
| 94 | 94 |
| 95 if (mapping->updateRequiresOwnBackingStoreForAncestorReasons(composi
tingContainer)) | 95 if (mapping->updateRequiresOwnBackingStoreForAncestorReasons(composi
tingContainer)) { |
| 96 layersNeedingPaintInvalidation.append(&layer); |
| 96 updateType = ForceUpdate; | 97 updateType = ForceUpdate; |
| 98 } |
| 97 | 99 |
| 98 // Note carefully: here we assume that the compositing state of all
descendants have been updated already, | 100 // Note carefully: here we assume that the compositing state of all
descendants have been updated already, |
| 99 // so it is legitimate to compute and cache the composited bounds fo
r this layer. | 101 // so it is legitimate to compute and cache the composited bounds fo
r this layer. |
| 100 mapping->updateCompositedBounds(); | 102 mapping->updateCompositedBounds(); |
| 101 | 103 |
| 102 if (RenderLayerReflectionInfo* reflection = layer.reflectionInfo())
{ | 104 if (RenderLayerReflectionInfo* reflection = layer.reflectionInfo())
{ |
| 103 if (reflection->reflectionLayer()->hasCompositedLayerMapping()) | 105 if (reflection->reflectionLayer()->hasCompositedLayerMapping()) |
| 104 reflection->reflectionLayer()->compositedLayerMapping()->upd
ateCompositedBounds(); | 106 reflection->reflectionLayer()->compositedLayerMapping()->upd
ateCompositedBounds(); |
| 105 } | 107 } |
| 106 | 108 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 129 if (layer.hasCompositedLayerMapping()) | 131 if (layer.hasCompositedLayerMapping()) |
| 130 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); | 132 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); |
| 131 | 133 |
| 132 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) | 134 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) |
| 133 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 135 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
| 134 } | 136 } |
| 135 | 137 |
| 136 #endif | 138 #endif |
| 137 | 139 |
| 138 } // namespace WebCore | 140 } // namespace WebCore |
| OLD | NEW |