Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: Source/core/rendering/compositing/CompositingLayerAssigner.cpp

Issue 367163003: Disallow squashing for layers with reflections (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use blue.png instead of ducky.png Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // virtual/softwarecompositing/video/video-controls-layer-creation.html 130 // virtual/softwarecompositing/video/video-controls-layer-creation.html
131 if (layer->renderer()->isVideo()) 131 if (layer->renderer()->isVideo())
132 return CompositingReasonSquashingVideoIsDisallowed; 132 return CompositingReasonSquashingVideoIsDisallowed;
133 133
134 // Don't squash iframes, frames or plugins. 134 // Don't squash iframes, frames or plugins.
135 // FIXME: this is only necessary because there is frame code that assumes th at composited frames are not squashed. 135 // FIXME: this is only necessary because there is frame code that assumes th at composited frames are not squashed.
136 if (layer->renderer()->isRenderPart()) 136 if (layer->renderer()->isRenderPart())
137 return CompositedReasonSquashingRenderPart; 137 return CompositingReasonSquashingRenderPartIsDisallowed;
138
139 if (layer->reflectionInfo())
140 return CompositingReasonSquashingReflectionIsDisallowed;
138 141
139 if (squashingWouldExceedSparsityTolerance(layer, squashingState)) 142 if (squashingWouldExceedSparsityTolerance(layer, squashingState))
140 return CompositingReasonSquashingSparsityExceeded; 143 return CompositingReasonSquashingSparsityExceeded;
141 144
142 // FIXME: this is not efficient, since it walks up the tree . We should stor e these values on the CompositingInputsCache. 145 // FIXME: this is not efficient, since it walks up the tree . We should stor e these values on the CompositingInputsCache.
143 ASSERT(squashingState.hasMostRecentMapping); 146 ASSERT(squashingState.hasMostRecentMapping);
144 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning Layer(); 147 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning Layer();
145 148
146 if (layer->compositingInputs().clippingContainer != squashingLayer.compositi ngInputs().clippingContainer) { 149 if (layer->compositingInputs().clippingContainer != squashingLayer.compositi ngInputs().clippingContainer) {
147 if (!squashingLayer.compositedLayerMapping()->containingSquashedLayer(la yer->compositingInputs().clippingContainer)) 150 if (!squashingLayer.compositedLayerMapping()->containingSquashedLayer(la yer->compositingInputs().clippingContainer))
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 279
277 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC hildren | PositiveZOrderChildren); 280 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC hildren | PositiveZOrderChildren);
278 while (RenderLayerStackingNode* curNode = iterator.next()) 281 while (RenderLayerStackingNode* curNode = iterator.next())
279 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingRepaint); 282 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingRepaint);
280 283
281 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer) 284 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer)
282 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; 285 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true;
283 } 286 }
284 287
285 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698