| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 const RenderLayer::AncestorDependentCompositingInputs& compositingInputs = l
ayer->ancestorDependentCompositingInputs(); | 159 const RenderLayer::AncestorDependentCompositingInputs& compositingInputs = l
ayer->ancestorDependentCompositingInputs(); |
| 160 const RenderLayer::AncestorDependentCompositingInputs& squashingLayerComposi
tingInputs = squashingLayer.ancestorDependentCompositingInputs(); | 160 const RenderLayer::AncestorDependentCompositingInputs& squashingLayerComposi
tingInputs = squashingLayer.ancestorDependentCompositingInputs(); |
| 161 | 161 |
| 162 if (compositingInputs.opacityAncestor != squashingLayerCompositingInputs.opa
cityAncestor) | 162 if (compositingInputs.opacityAncestor != squashingLayerCompositingInputs.opa
cityAncestor) |
| 163 return CompositingReasonSquashingOpacityAncestorMismatch; | 163 return CompositingReasonSquashingOpacityAncestorMismatch; |
| 164 | 164 |
| 165 if (compositingInputs.transformAncestor != squashingLayerCompositingInputs.t
ransformAncestor) | 165 if (compositingInputs.transformAncestor != squashingLayerCompositingInputs.t
ransformAncestor) |
| 166 return CompositingReasonSquashingTransformAncestorMismatch; | 166 return CompositingReasonSquashingTransformAncestorMismatch; |
| 167 | 167 |
| 168 if (compositingInputs.filterAncestor != squashingLayerCompositingInputs.filt
erAncestor) | 168 if (layer->hasFilter() || compositingInputs.filterAncestor != squashingLayer
CompositingInputs.filterAncestor) |
| 169 return CompositingReasonSquashingFilterAncestorMismatch; | 169 return CompositingReasonSquashingFilterMismatch; |
| 170 | 170 |
| 171 return CompositingReasonNone; | 171 return CompositingReasonNone; |
| 172 } | 172 } |
| 173 | 173 |
| 174 void CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
ashingState& squashingState, const CompositingStateTransitionType compositedLaye
rUpdate, | 174 void CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
ashingState& squashingState, const CompositingStateTransitionType compositedLaye
rUpdate, |
| 175 Vector<RenderLayer*>& layersNeedingPaintInvalidation) | 175 Vector<RenderLayer*>& layersNeedingPaintInvalidation) |
| 176 { | 176 { |
| 177 // NOTE: In the future as we generalize this, the background of this layer m
ay need to be assigned to a different backing than | 177 // NOTE: In the future as we generalize this, the background of this layer m
ay need to be assigned to a different backing than |
| 178 // the squashed RenderLayer's own primary contents. This would happen when w
e have a composited negative z-index element that needs | 178 // the squashed RenderLayer's own primary contents. This would happen when w
e have a composited negative z-index element that needs |
| 179 // to paint on top of the background, but below the layer's main contents. F
or now, because we always composite layers | 179 // to paint on top of the background, but below the layer's main contents. F
or now, because we always composite layers |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC
hildren | PositiveZOrderChildren); | 283 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC
hildren | PositiveZOrderChildren); |
| 284 while (RenderLayerStackingNode* curNode = iterator.next()) | 284 while (RenderLayerStackingNode* curNode = iterator.next()) |
| 285 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); | 285 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); |
| 286 | 286 |
| 287 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) | 287 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) |
| 288 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; | 288 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; |
| 289 } | 289 } |
| 290 | 290 |
| 291 } | 291 } |
| OLD | NEW |