| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 if (layer->renderer()->hasClipOrOverflowClip()) | 159 if (layer->renderer()->hasClipOrOverflowClip()) |
| 160 info.hasAncestorWithClipOrOverflowClip = true; | 160 info.hasAncestorWithClipOrOverflowClip = true; |
| 161 | 161 |
| 162 if (layer->renderer()->hasClipPath()) | 162 if (layer->renderer()->hasClipPath()) |
| 163 info.hasAncestorWithClipPath = true; | 163 info.hasAncestorWithClipPath = true; |
| 164 | 164 |
| 165 RenderLayer::DescendantDependentCompositingInputs descendantProperties; | 165 RenderLayer::DescendantDependentCompositingInputs descendantProperties; |
| 166 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) { | 166 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) { |
| 167 updateRecursive(child, updateType, info); | 167 updateRecursive(child, updateType, info); |
| 168 |
| 168 descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWi
thClipPath() || child->renderer()->hasClipPath(); | 169 descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWi
thClipPath() || child->renderer()->hasClipPath(); |
| 170 descendantProperties.hasDescendantWithBlendMode |= child->hasDescendantW
ithBlendMode() || child->renderer()->hasBlendMode(); |
| 169 } | 171 } |
| 170 | 172 |
| 173 layer->updateDescendantDependentCompositingInputs(descendantProperties); |
| 174 layer->didUpdateCompositingInputs(); |
| 175 |
| 171 m_geometryMap.popMappingsToAncestor(layer->parent()); | 176 m_geometryMap.popMappingsToAncestor(layer->parent()); |
| 172 | |
| 173 layer->updateDescendantDependentCompositingInputs(descendantProperties); | |
| 174 | |
| 175 layer->didUpdateCompositingInputs(); | |
| 176 } | 177 } |
| 177 | 178 |
| 178 #if ENABLE(ASSERT) | 179 #if ENABLE(ASSERT) |
| 179 | 180 |
| 180 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(Ren
derLayer* layer) | 181 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(Ren
derLayer* layer) |
| 181 { | 182 { |
| 182 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 183 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 183 ASSERT(!layer->needsCompositingInputsUpdate()); | 184 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 184 | 185 |
| 185 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) | 186 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
| 186 assertNeedsCompositingInputsUpdateBitsCleared(child); | 187 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 187 } | 188 } |
| 188 | 189 |
| 189 #endif | 190 #endif |
| 190 | 191 |
| 191 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |