| 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/layout/compositing/CompositingInputsUpdater.h" | 6 #include "core/layout/compositing/CompositingInputsUpdater.h" |
| 7 | 7 |
| 8 #include "core/layout/LayoutBlock.h" | 8 #include "core/layout/LayoutBlock.h" |
| 9 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" | 9 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" |
| 10 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 10 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
| 11 #include "core/paint/DeprecatedPaintLayer.h" | 11 #include "core/paint/DeprecatedPaintLayer.h" |
| 12 #include "platform/TraceEvent.h" | 12 #include "platform/TraceEvent.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 CompositingInputsUpdater::CompositingInputsUpdater(DeprecatedPaintLayer* rootLay
er) | 16 CompositingInputsUpdater::CompositingInputsUpdater(DeprecatedPaintLayer* rootLay
er) |
| 17 : m_geometryMap(UseTransforms) | 17 : m_geometryMap(UseTransforms) |
| 18 , m_rootLayer(rootLayer) | 18 , m_rootLayer(rootLayer) |
| 19 { | 19 { |
| 20 } | 20 } |
| 21 | 21 |
| 22 CompositingInputsUpdater::~CompositingInputsUpdater() | 22 CompositingInputsUpdater::~CompositingInputsUpdater() |
| 23 { | 23 { |
| 24 } | 24 } |
| 25 | 25 |
| 26 void CompositingInputsUpdater::update() | 26 void CompositingInputsUpdater::update() |
| 27 { | 27 { |
| 28 TRACE_EVENT0("blink", "CompositingInputsUpdater::update"); | 28 TRACE_EVENT0("blink", "CompositingInputsUpdater::update"); |
| 29 m_rootLayer->clipper().precalculateAbsoluteClipRects(); | |
| 30 updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo()); | 29 updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo()); |
| 31 } | 30 } |
| 32 | 31 |
| 33 static const DeprecatedPaintLayer* findParentLayerOnClippingContainerChain(const
DeprecatedPaintLayer* layer) | 32 static const DeprecatedPaintLayer* findParentLayerOnClippingContainerChain(const
DeprecatedPaintLayer* layer) |
| 34 { | 33 { |
| 35 LayoutObject* current = layer->layoutObject(); | 34 LayoutObject* current = layer->layoutObject(); |
| 36 while (current) { | 35 while (current) { |
| 37 if (current->style()->position() == FixedPosition) { | 36 if (current->style()->position() == FixedPosition) { |
| 38 for (current = current->parent(); current && !current->canContainFix
edPositionObjects(); current = current->parent()) { | 37 for (current = current->parent(); current && !current->canContainFix
edPositionObjects(); current = current->parent()) { |
| 39 // All types of clips apply to fixed-position descendants of oth
er fixed-position elements. | 38 // All types of clips apply to fixed-position descendants of oth
er fixed-position elements. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 194 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 196 ASSERT(!layer->needsCompositingInputsUpdate()); | 195 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 197 | 196 |
| 198 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) | 197 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) |
| 199 assertNeedsCompositingInputsUpdateBitsCleared(child); | 198 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 200 } | 199 } |
| 201 | 200 |
| 202 #endif | 201 #endif |
| 203 | 202 |
| 204 } // namespace blink | 203 } // namespace blink |
| OLD | NEW |