| 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" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (layer->needsCompositingInputsUpdate()) { | 106 if (layer->needsCompositingInputsUpdate()) { |
| 107 if (info.enclosingCompositedLayer) | 107 if (info.enclosingCompositedLayer) |
| 108 info.enclosingCompositedLayer->compositedDeprecatedPaintLayerMapping
()->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree); | 108 info.enclosingCompositedLayer->compositedDeprecatedPaintLayerMapping
()->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree); |
| 109 updateType = ForceUpdate; | 109 updateType = ForceUpdate; |
| 110 } | 110 } |
| 111 | 111 |
| 112 if (updateType == ForceUpdate) { | 112 if (updateType == ForceUpdate) { |
| 113 DeprecatedPaintLayer::AncestorDependentCompositingInputs properties; | 113 DeprecatedPaintLayer::AncestorDependentCompositingInputs properties; |
| 114 | 114 |
| 115 if (!layer->isRootLayer()) { | 115 if (!layer->isRootLayer()) { |
| 116 properties.clippedAbsoluteBoundingBox = enclosingIntRect(m_geometryM
ap.absoluteRect(layer->boundingBoxForCompositingOverlapTest())); | 116 properties.clippedAbsoluteBoundingBox = enclosingIntRect(m_geometryM
ap.absoluteRect(FloatRect(layer->boundingBoxForCompositingOverlapTest()))); |
| 117 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very lit
tle sense, | 117 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very lit
tle sense, |
| 118 // but removing this code will make JSGameBench sad. | 118 // but removing this code will make JSGameBench sad. |
| 119 // See https://codereview.chromium.org/13912020/ | 119 // See https://codereview.chromium.org/13912020/ |
| 120 if (properties.clippedAbsoluteBoundingBox.isEmpty()) | 120 if (properties.clippedAbsoluteBoundingBox.isEmpty()) |
| 121 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); | 121 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); |
| 122 | 122 |
| 123 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundCl
ipRect(ClipRectsContext(m_rootLayer, AbsoluteClipRects)).rect()); | 123 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundCl
ipRect(ClipRectsContext(m_rootLayer, AbsoluteClipRects)).rect()); |
| 124 properties.clippedAbsoluteBoundingBox.intersect(clipRect); | 124 properties.clippedAbsoluteBoundingBox.intersect(clipRect); |
| 125 | 125 |
| 126 const DeprecatedPaintLayer* parent = layer->parent(); | 126 const DeprecatedPaintLayer* parent = layer->parent(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 194 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 195 ASSERT(!layer->needsCompositingInputsUpdate()); | 195 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 196 | 196 |
| 197 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) | 197 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) |
| 198 assertNeedsCompositingInputsUpdateBitsCleared(child); | 198 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 199 } | 199 } |
| 200 | 200 |
| 201 #endif | 201 #endif |
| 202 | 202 |
| 203 } // namespace blink | 203 } // namespace blink |
| OLD | NEW |