| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/rendering/compositing/CompositingInputsUpdater.h" | 6 #include "core/rendering/compositing/CompositingInputsUpdater.h" |
| 7 | 7 |
| 8 #include "core/rendering/RenderBlock.h" | 8 #include "core/rendering/RenderBlock.h" |
| 9 #include "core/rendering/RenderLayer.h" | 9 #include "core/rendering/RenderLayer.h" |
| 10 #include "core/rendering/compositing/CompositedLayerMapping.h" | 10 #include "core/rendering/compositing/CompositedLayerMapping.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 info.hasAncestorWithClipOrOverflowClip = true; | 149 info.hasAncestorWithClipOrOverflowClip = true; |
| 150 | 150 |
| 151 if (layer->renderer()->hasClipPath()) | 151 if (layer->renderer()->hasClipPath()) |
| 152 info.hasAncestorWithClipPath = true; | 152 info.hasAncestorWithClipPath = true; |
| 153 | 153 |
| 154 RenderLayer::DescendantDependentCompositingInputs descendantProperties; | 154 RenderLayer::DescendantDependentCompositingInputs descendantProperties; |
| 155 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) { | 155 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) { |
| 156 updateRecursive(child, updateType, info); | 156 updateRecursive(child, updateType, info); |
| 157 | 157 |
| 158 descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWi
thClipPath() || child->renderer()->hasClipPath(); | 158 descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWi
thClipPath() || child->renderer()->hasClipPath(); |
| 159 descendantProperties.hasDescendantWithBlendMode |= child->hasDescendantW
ithBlendMode() || child->renderer()->hasBlendMode(); | |
| 160 } | 159 } |
| 161 | 160 |
| 162 layer->updateDescendantDependentCompositingInputs(descendantProperties); | 161 layer->updateDescendantDependentCompositingInputs(descendantProperties); |
| 163 layer->didUpdateCompositingInputs(); | 162 layer->didUpdateCompositingInputs(); |
| 164 | 163 |
| 165 m_geometryMap.popMappingsToAncestor(layer->parent()); | 164 m_geometryMap.popMappingsToAncestor(layer->parent()); |
| 166 } | 165 } |
| 167 | 166 |
| 168 #if ENABLE(ASSERT) | 167 #if ENABLE(ASSERT) |
| 169 | 168 |
| 170 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(Ren
derLayer* layer) | 169 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(Ren
derLayer* layer) |
| 171 { | 170 { |
| 172 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 171 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 173 ASSERT(!layer->needsCompositingInputsUpdate()); | 172 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 174 | 173 |
| 175 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) | 174 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
| 176 assertNeedsCompositingInputsUpdateBitsCleared(child); | 175 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 177 } | 176 } |
| 178 | 177 |
| 179 #endif | 178 #endif |
| 180 | 179 |
| 181 } // namespace blink | 180 } // namespace blink |
| OLD | NEW |