| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 if (layer.stackingNode()->isStackingContext()) | 55 if (layer.stackingNode()->isStackingContext()) |
| 56 m_compositingStackingContext = &layer; | 56 m_compositingStackingContext = &layer; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 const RenderLayer* compositingContainer(const RenderLayer& layer) const | 60 const RenderLayer* compositingContainer(const RenderLayer& layer) const |
| 61 { | 61 { |
| 62 return layer.stackingNode()->isNormalFlowOnly() ? m_compositingAncestor
: m_compositingStackingContext; | 62 return layer.stackingNode()->isNormalFlowOnly() ? m_compositingAncestor
: m_compositingStackingContext; |
| 63 } | 63 } |
| 64 | 64 |
| 65 const RenderLayer* compositingStackingContext() const |
| 66 { |
| 67 return m_compositingStackingContext; |
| 68 } |
| 69 |
| 65 private: | 70 private: |
| 66 const RenderLayer* m_compositingStackingContext; | 71 const RenderLayer* m_compositingStackingContext; |
| 67 const RenderLayer* m_compositingAncestor; | 72 const RenderLayer* m_compositingAncestor; |
| 68 }; | 73 }; |
| 69 | 74 |
| 70 GraphicsLayerUpdater::GraphicsLayerUpdater() | 75 GraphicsLayerUpdater::GraphicsLayerUpdater() |
| 71 : m_needsRebuildTree(false) | 76 : m_needsRebuildTree(false) |
| 72 { | 77 { |
| 73 } | 78 } |
| 74 | 79 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 102 mapping->updateCompositedBounds(); | 107 mapping->updateCompositedBounds(); |
| 103 | 108 |
| 104 if (RenderLayerReflectionInfo* reflection = layer.reflectionInfo())
{ | 109 if (RenderLayerReflectionInfo* reflection = layer.reflectionInfo())
{ |
| 105 if (reflection->reflectionLayer()->hasCompositedLayerMapping()) | 110 if (reflection->reflectionLayer()->hasCompositedLayerMapping()) |
| 106 reflection->reflectionLayer()->compositedLayerMapping()->upd
ateCompositedBounds(); | 111 reflection->reflectionLayer()->compositedLayerMapping()->upd
ateCompositedBounds(); |
| 107 } | 112 } |
| 108 | 113 |
| 109 if (mapping->updateGraphicsLayerConfiguration()) | 114 if (mapping->updateGraphicsLayerConfiguration()) |
| 110 m_needsRebuildTree = true; | 115 m_needsRebuildTree = true; |
| 111 | 116 |
| 112 mapping->updateGraphicsLayerGeometry(compositingContainer, layersNee
dingPaintInvalidation); | 117 mapping->updateGraphicsLayerGeometry(compositingContainer, context.c
ompositingStackingContext(), layersNeedingPaintInvalidation); |
| 113 | 118 |
| 114 if (mapping->hasUnpositionedOverflowControlsLayers()) | 119 if (mapping->hasUnpositionedOverflowControlsLayers()) |
| 115 layer.scrollableArea()->positionOverflowControls(IntSize()); | 120 layer.scrollableArea()->positionOverflowControls(IntSize()); |
| 116 | 121 |
| 117 updateType = mapping->updateTypeForChildren(updateType); | 122 updateType = mapping->updateTypeForChildren(updateType); |
| 118 mapping->clearNeedsGraphicsLayerUpdate(); | 123 mapping->clearNeedsGraphicsLayerUpdate(); |
| 119 } | 124 } |
| 120 } | 125 } |
| 121 | 126 |
| 122 UpdateContext childContext(context, layer); | 127 UpdateContext childContext(context, layer); |
| 123 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) | 128 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) |
| 124 updateRecursive(*child, updateType, childContext, layersNeedingPaintInva
lidation); | 129 updateRecursive(*child, updateType, childContext, layersNeedingPaintInva
lidation); |
| 125 } | 130 } |
| 126 | 131 |
| 127 #if ENABLE(ASSERT) | 132 #if ENABLE(ASSERT) |
| 128 | 133 |
| 129 void GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(RenderLay
er& layer) | 134 void GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(RenderLay
er& layer) |
| 130 { | 135 { |
| 131 if (layer.hasCompositedLayerMapping()) | 136 if (layer.hasCompositedLayerMapping()) |
| 132 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); | 137 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea
red(); |
| 133 | 138 |
| 134 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) | 139 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl
ing()) |
| 135 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 140 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
| 136 } | 141 } |
| 137 | 142 |
| 138 #endif | 143 #endif |
| 139 | 144 |
| 140 } // namespace blink | 145 } // namespace blink |
| OLD | NEW |