| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // squashed (and therefore has no CLM nor a child containment graphics layer
). | 152 // squashed (and therefore has no CLM nor a child containment graphics layer
). |
| 153 if (m_compositor->clipsCompositingDescendants(layer)) | 153 if (m_compositor->clipsCompositingDescendants(layer)) |
| 154 return CompositingReasonSquashedLayerClipsCompositingDescendants; | 154 return CompositingReasonSquashedLayerClipsCompositingDescendants; |
| 155 | 155 |
| 156 if (layer->scrollsWithRespectTo(&squashingLayer)) | 156 if (layer->scrollsWithRespectTo(&squashingLayer)) |
| 157 return CompositingReasonScrollsWithRespectToSquashingLayer; | 157 return CompositingReasonScrollsWithRespectToSquashingLayer; |
| 158 | 158 |
| 159 if (layer->scrollParent() && layer->hasCompositingDescendant()) | 159 if (layer->scrollParent() && layer->hasCompositingDescendant()) |
| 160 return CompositingReasonScrollChildWithCompositedDescendants; | 160 return CompositingReasonScrollChildWithCompositedDescendants; |
| 161 | 161 |
| 162 const PaintLayer::AncestorDependentCompositingInputs& compositingInputs = la
yer->ancestorDependentCompositingInputs(); | 162 if (layer->opacityAncestor() != squashingLayer.opacityAncestor()) |
| 163 const PaintLayer::AncestorDependentCompositingInputs& squashingLayerComposit
ingInputs = squashingLayer.ancestorDependentCompositingInputs(); | |
| 164 | |
| 165 if (compositingInputs.opacityAncestor != squashingLayerCompositingInputs.opa
cityAncestor) | |
| 166 return CompositingReasonSquashingOpacityAncestorMismatch; | 163 return CompositingReasonSquashingOpacityAncestorMismatch; |
| 167 | 164 |
| 168 if (compositingInputs.transformAncestor != squashingLayerCompositingInputs.t
ransformAncestor) | 165 if (layer->transformAncestor() != squashingLayer.transformAncestor()) |
| 169 return CompositingReasonSquashingTransformAncestorMismatch; | 166 return CompositingReasonSquashingTransformAncestorMismatch; |
| 170 | 167 |
| 171 if (layer->hasFilter() || compositingInputs.filterAncestor != squashingLayer
CompositingInputs.filterAncestor) | 168 if (layer->hasFilter() || layer->filterAncestor() != squashingLayer.filterAn
cestor()) |
| 172 return CompositingReasonSquashingFilterMismatch; | 169 return CompositingReasonSquashingFilterMismatch; |
| 173 | 170 |
| 174 if (compositingInputs.nearestFixedPositionLayer != squashingLayerCompositing
Inputs.nearestFixedPositionLayer) | 171 if (layer->nearestFixedPositionLayer() != squashingLayer.nearestFixedPositio
nLayer()) |
| 175 return CompositingReasonSquashingNearestFixedPositionMismatch; | 172 return CompositingReasonSquashingNearestFixedPositionMismatch; |
| 176 ASSERT(layer->layoutObject()->style()->position() != FixedPosition); | 173 ASSERT(layer->layoutObject()->style()->position() != FixedPosition); |
| 177 | 174 |
| 178 if ((squashingLayer.layoutObject()->style()->subtreeWillChangeContents() &&
squashingLayer.layoutObject()->style()->isRunningAnimationOnCompositor()) | 175 if ((squashingLayer.layoutObject()->style()->subtreeWillChangeContents() &&
squashingLayer.layoutObject()->style()->isRunningAnimationOnCompositor()) |
| 179 || squashingLayer.layoutObject()->style()->shouldCompositeForCurrentAnim
ations()) | 176 || squashingLayer.layoutObject()->style()->shouldCompositeForCurrentAnim
ations()) |
| 180 return CompositingReasonSquashingLayerIsAnimating; | 177 return CompositingReasonSquashingLayerIsAnimating; |
| 181 | 178 |
| 182 return CompositingReasonNone; | 179 return CompositingReasonNone; |
| 183 } | 180 } |
| 184 | 181 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 300 |
| 304 PaintLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowCh
ildren | PositiveZOrderChildren); | 301 PaintLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowCh
ildren | PositiveZOrderChildren); |
| 305 while (PaintLayerStackingNode* curNode = iterator.next()) | 302 while (PaintLayerStackingNode* curNode = iterator.next()) |
| 306 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); | 303 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); |
| 307 | 304 |
| 308 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) | 305 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) |
| 309 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; | 306 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; |
| 310 } | 307 } |
| 311 | 308 |
| 312 } // namespace blink | 309 } // namespace blink |
| OLD | NEW |