| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 info.hasAncestorWithClipOrOverflowClip = true; | 165 info.hasAncestorWithClipOrOverflowClip = true; |
| 166 | 166 |
| 167 if (layer->renderer()->hasClipPath()) | 167 if (layer->renderer()->hasClipPath()) |
| 168 info.hasAncestorWithClipPath = true; | 168 info.hasAncestorWithClipPath = true; |
| 169 | 169 |
| 170 RenderLayer::DescendantDependentCompositingInputs descendantProperties; | 170 RenderLayer::DescendantDependentCompositingInputs descendantProperties; |
| 171 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) { | 171 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) { |
| 172 updateRecursive(child, updateType, info); | 172 updateRecursive(child, updateType, info); |
| 173 | 173 |
| 174 descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWi
thClipPath() || child->renderer()->hasClipPath(); | 174 descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWi
thClipPath() || child->renderer()->hasClipPath(); |
| 175 descendantProperties.hasNonIsolatedDescendantWithBlendMode |= (!child->s
tackingNode()->isStackingContext() && child->hasNonIsolatedDescendantWithBlendMo
de()) || child->renderer()->hasBlendMode(); | 175 descendantProperties.hasNonIsolatedDescendantWithBlendMode |= (!child->s
tackingNode()->isStackingContext() && child->hasNonIsolatedDescendantWithBlendMo
de()) || child->renderer()->style()->hasBlendMode(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 layer->updateDescendantDependentCompositingInputs(descendantProperties); | 178 layer->updateDescendantDependentCompositingInputs(descendantProperties); |
| 179 layer->didUpdateCompositingInputs(); | 179 layer->didUpdateCompositingInputs(); |
| 180 | 180 |
| 181 m_geometryMap.popMappingsToAncestor(layer->parent()); | 181 m_geometryMap.popMappingsToAncestor(layer->parent()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 #if ENABLE(ASSERT) | 184 #if ENABLE(ASSERT) |
| 185 | 185 |
| 186 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(Ren
derLayer* layer) | 186 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(Ren
derLayer* layer) |
| 187 { | 187 { |
| 188 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 188 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 189 ASSERT(!layer->needsCompositingInputsUpdate()); | 189 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 190 | 190 |
| 191 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) | 191 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
| 192 assertNeedsCompositingInputsUpdateBitsCleared(child); | 192 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 193 } | 193 } |
| 194 | 194 |
| 195 #endif | 195 #endif |
| 196 | 196 |
| 197 } // namespace blink | 197 } // namespace blink |
| OLD | NEW |