| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // FIXME: this special case for video exists only to deal with corner cases | 123 // FIXME: this special case for video exists only to deal with corner cases |
| 124 // where a RenderVideo does not report that it needs to be directly composit
ed. | 124 // where a RenderVideo does not report that it needs to be directly composit
ed. |
| 125 // Video does not currently support sharing a backing, but this could be | 125 // Video does not currently support sharing a backing, but this could be |
| 126 // generalized in the future. The following layout tests fail if we permit t
he | 126 // generalized in the future. The following layout tests fail if we permit t
he |
| 127 // video to share a backing with other layers. | 127 // video to share a backing with other layers. |
| 128 // | 128 // |
| 129 // compositing/video/video-controls-layer-creation.html | 129 // compositing/video/video-controls-layer-creation.html |
| 130 if (layer->renderer()->isVideo()) | 130 if (layer->renderer()->isVideo()) |
| 131 return CompositingReasonSquashingVideoIsDisallowed; | 131 return CompositingReasonSquashingVideoIsDisallowed; |
| 132 | 132 |
| 133 // Don't squash iframes, frames or plugins. | |
| 134 // FIXME: this is only necessary because there is frame code that assumes th
at composited frames are not squashed. | |
| 135 if (layer->renderer()->isRenderPart()) | |
| 136 return CompositingReasonSquashingRenderPartIsDisallowed; | |
| 137 | |
| 138 if (squashingWouldExceedSparsityTolerance(layer, squashingState)) | 133 if (squashingWouldExceedSparsityTolerance(layer, squashingState)) |
| 139 return CompositingReasonSquashingSparsityExceeded; | 134 return CompositingReasonSquashingSparsityExceeded; |
| 140 | 135 |
| 141 // FIXME: this is not efficient, since it walks up the tree . We should stor
e these values on the CompositingInputsCache. | 136 // FIXME: this is not efficient, since it walks up the tree . We should stor
e these values on the CompositingInputsCache. |
| 142 ASSERT(squashingState.hasMostRecentMapping); | 137 ASSERT(squashingState.hasMostRecentMapping); |
| 143 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning
Layer(); | 138 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning
Layer(); |
| 144 | 139 |
| 145 if (layer->clippingContainer() != squashingLayer.clippingContainer() && !squ
ashingLayer.compositedLayerMapping()->containingSquashedLayer(layer->clippingCon
tainer())) | 140 if (layer->clippingContainer() != squashingLayer.clippingContainer() && !squ
ashingLayer.compositedLayerMapping()->containingSquashedLayer(layer->clippingCon
tainer())) |
| 146 return CompositingReasonSquashingClippingContainerMismatch; | 141 return CompositingReasonSquashingClippingContainerMismatch; |
| 147 | 142 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 255 |
| 261 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC
hildren | PositiveZOrderChildren); | 256 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC
hildren | PositiveZOrderChildren); |
| 262 while (RenderLayerStackingNode* curNode = iterator.next()) | 257 while (RenderLayerStackingNode* curNode = iterator.next()) |
| 263 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); | 258 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); |
| 264 | 259 |
| 265 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) | 260 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) |
| 266 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; | 261 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; |
| 267 } | 262 } |
| 268 | 263 |
| 269 } | 264 } |
| OLD | NEW |