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(); |
29 updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo()); | 30 updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo()); |
30 } | 31 } |
31 | 32 |
32 static const DeprecatedPaintLayer* findParentLayerOnClippingContainerChain(const
DeprecatedPaintLayer* layer) | 33 static const DeprecatedPaintLayer* findParentLayerOnClippingContainerChain(const
DeprecatedPaintLayer* layer) |
33 { | 34 { |
34 LayoutObject* current = layer->layoutObject(); | 35 LayoutObject* current = layer->layoutObject(); |
35 while (current) { | 36 while (current) { |
36 if (current->style()->position() == FixedPosition) { | 37 if (current->style()->position() == FixedPosition) { |
37 for (current = current->parent(); current && !current->canContainFix
edPositionObjects(); current = current->parent()) { | 38 for (current = current->parent(); current && !current->canContainFix
edPositionObjects(); current = current->parent()) { |
38 // All types of clips apply to fixed-position descendants of oth
er fixed-position elements. | 39 // 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... |
194 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 195 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
195 ASSERT(!layer->needsCompositingInputsUpdate()); | 196 ASSERT(!layer->needsCompositingInputsUpdate()); |
196 | 197 |
197 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) | 198 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) |
198 assertNeedsCompositingInputsUpdateBitsCleared(child); | 199 assertNeedsCompositingInputsUpdateBitsCleared(child); |
199 } | 200 } |
200 | 201 |
201 #endif | 202 #endif |
202 | 203 |
203 } // namespace blink | 204 } // namespace blink |
OLD | NEW |