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 "core/layout/compositing/CompositingInputsUpdater.h" | 5 #include "core/layout/compositing/CompositingInputsUpdater.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/layout/LayoutBlock.h" | 9 #include "core/layout/LayoutBlock.h" |
10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 info.enclosingCompositedLayer->compositedLayerMapping() | 140 info.enclosingCompositedLayer->compositedLayerMapping() |
141 ->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree); | 141 ->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree); |
142 updateType = ForceUpdate; | 142 updateType = ForceUpdate; |
143 } | 143 } |
144 | 144 |
145 if (updateType == ForceUpdate) { | 145 if (updateType == ForceUpdate) { |
146 PaintLayer::AncestorDependentCompositingInputs properties; | 146 PaintLayer::AncestorDependentCompositingInputs properties; |
147 PaintLayer::RareAncestorDependentCompositingInputs rareProperties; | 147 PaintLayer::RareAncestorDependentCompositingInputs rareProperties; |
148 | 148 |
149 if (!layer->isRootLayer()) { | 149 if (!layer->isRootLayer()) { |
150 properties.clippedAbsoluteBoundingBox = | 150 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
151 enclosingIntRect(m_geometryMap.absoluteRect( | 151 properties.clippedAbsoluteBoundingBox = |
152 FloatRect(layer->boundingBoxForCompositingOverlapTest()))); | 152 enclosingIntRect(m_geometryMap.absoluteRect( |
153 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little | 153 FloatRect(layer->boundingBoxForCompositingOverlapTest()))); |
154 // sense, but removing this code will make JSGameBench sad. | 154 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little |
155 // See https://codereview.chromium.org/13912020/ | 155 // sense, but removing this code will make JSGameBench sad. |
156 if (properties.clippedAbsoluteBoundingBox.isEmpty()) | 156 // See https://codereview.chromium.org/13912020/ |
157 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); | 157 if (properties.clippedAbsoluteBoundingBox.isEmpty()) |
| 158 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); |
158 | 159 |
159 IntRect clipRect = | 160 IntRect clipRect = |
160 pixelSnappedIntRect(layer->clipper() | 161 pixelSnappedIntRect(layer->clipper() |
161 .backgroundClipRect(ClipRectsContext( | 162 .backgroundClipRect(ClipRectsContext( |
162 m_rootLayer, AbsoluteClipRects)) | 163 m_rootLayer, AbsoluteClipRects)) |
163 .rect()); | 164 .rect()); |
164 properties.clippedAbsoluteBoundingBox.intersect(clipRect); | 165 properties.clippedAbsoluteBoundingBox.intersect(clipRect); |
| 166 } |
165 | 167 |
166 const PaintLayer* parent = layer->parent(); | 168 const PaintLayer* parent = layer->parent(); |
167 rareProperties.opacityAncestor = | 169 rareProperties.opacityAncestor = |
168 parent->isTransparent() ? parent : parent->opacityAncestor(); | 170 parent->isTransparent() ? parent : parent->opacityAncestor(); |
169 rareProperties.transformAncestor = | 171 rareProperties.transformAncestor = |
170 parent->transform() ? parent : parent->transformAncestor(); | 172 parent->transform() ? parent : parent->transformAncestor(); |
171 rareProperties.filterAncestor = parent->hasFilterInducingProperty() | 173 rareProperties.filterAncestor = parent->hasFilterInducingProperty() |
172 ? parent | 174 ? parent |
173 : parent->filterAncestor(); | 175 : parent->filterAncestor(); |
174 bool layerIsFixedPosition = | 176 bool layerIsFixedPosition = |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 ASSERT(!layer->needsCompositingInputsUpdate()); | 276 ASSERT(!layer->needsCompositingInputsUpdate()); |
275 | 277 |
276 for (PaintLayer* child = layer->firstChild(); child; | 278 for (PaintLayer* child = layer->firstChild(); child; |
277 child = child->nextSibling()) | 279 child = child->nextSibling()) |
278 assertNeedsCompositingInputsUpdateBitsCleared(child); | 280 assertNeedsCompositingInputsUpdateBitsCleared(child); |
279 } | 281 } |
280 | 282 |
281 #endif | 283 #endif |
282 | 284 |
283 } // namespace blink | 285 } // namespace blink |
OLD | NEW |