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

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

Issue 1209033009: Clear the groupedMapping parameter in layers when removed from the group (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Invalidation fixed Created 5 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
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // Issue a paint invalidation, since |layer| may have been added to an a lready-existing squashing layer. 204 // Issue a paint invalidation, since |layer| may have been added to an a lready-existing squashing layer.
205 TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent: :AddedToSquashingLayer); 205 TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent: :AddedToSquashingLayer);
206 layersNeedingPaintInvalidation.append(layer); 206 layersNeedingPaintInvalidation.append(layer);
207 m_layersChanged = true; 207 m_layersChanged = true;
208 } else if (compositedLayerUpdate == RemoveFromSquashingLayer) { 208 } else if (compositedLayerUpdate == RemoveFromSquashingLayer) {
209 if (layer->groupedMapping()) { 209 if (layer->groupedMapping()) {
210 // Before removing |layer| from an already-existing squashing layer that may have other content, issue a paint invalidation. 210 // Before removing |layer| from an already-existing squashing layer that may have other content, issue a paint invalidation.
211 m_compositor->paintInvalidationOnCompositingChange(layer); 211 m_compositor->paintInvalidationOnCompositingChange(layer);
212 layer->groupedMapping()->setNeedsGraphicsLayerUpdate(GraphicsLayerUp dateSubtree); 212 layer->groupedMapping()->setNeedsGraphicsLayerUpdate(GraphicsLayerUp dateSubtree);
213 layer->setGroupedMapping(nullptr); 213 layer->setGroupedMapping(nullptr, true);
214 } 214 }
215 215
216 // If we need to issue paint invalidations, do so now that we've removed it from a squashed layer. 216 // If we need to issue paint invalidations, do so now that we've removed it from a squashed layer.
217 TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent: :RemovedFromSquashingLayer); 217 TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent: :RemovedFromSquashingLayer);
218 layersNeedingPaintInvalidation.append(layer); 218 layersNeedingPaintInvalidation.append(layer);
219 m_layersChanged = true; 219 m_layersChanged = true;
220 220
221 layer->setLostGroupedMapping(false); 221 layer->setLostGroupedMapping(false);
222 } 222 }
223 } 223 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 DeprecatedPaintLayerStackingNodeIterator iterator(*layer->stackingNode(), No rmalFlowChildren | PositiveZOrderChildren); 300 DeprecatedPaintLayerStackingNodeIterator iterator(*layer->stackingNode(), No rmalFlowChildren | PositiveZOrderChildren);
301 while (DeprecatedPaintLayerStackingNode* curNode = iterator.next()) 301 while (DeprecatedPaintLayerStackingNode* curNode = iterator.next())
302 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingPaintInvalidation); 302 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingPaintInvalidation);
303 303
304 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer) 304 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer)
305 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; 305 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true;
306 } 306 }
307 307
308 } 308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698