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

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

Issue 457473002: Remove the CompositedLayerMappingPtr smart ptr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void CompositingLayerAssigner::assign(RenderLayer* updateRoot, Vector<RenderLaye r*>& layersNeedingRepaint) 50 void CompositingLayerAssigner::assign(RenderLayer* updateRoot, Vector<RenderLaye r*>& layersNeedingRepaint)
51 { 51 {
52 TRACE_EVENT0("blink_rendering", "CompositingLayerAssigner::assign"); 52 TRACE_EVENT0("blink_rendering", "CompositingLayerAssigner::assign");
53 53
54 SquashingState squashingState; 54 SquashingState squashingState;
55 assignLayersToBackingsInternal(updateRoot, squashingState, layersNeedingRepa int); 55 assignLayersToBackingsInternal(updateRoot, squashingState, layersNeedingRepa int);
56 if (squashingState.hasMostRecentMapping) 56 if (squashingState.hasMostRecentMapping)
57 squashingState.mostRecentMapping->finishAccumulatingSquashingLayers(squa shingState.nextSquashedLayerIndex); 57 squashingState.mostRecentMapping->finishAccumulatingSquashingLayers(squa shingState.nextSquashedLayerIndex);
58 } 58 }
59 59
60 void CompositingLayerAssigner::SquashingState::updateSquashingStateForNewMapping (CompositedLayerMappingPtr newCompositedLayerMapping, bool hasNewCompositedLayer Mapping) 60 void CompositingLayerAssigner::SquashingState::updateSquashingStateForNewMapping (CompositedLayerMapping* newCompositedLayerMapping, bool hasNewCompositedLayerMa pping)
61 { 61 {
62 // The most recent backing is done accumulating any more squashing layers. 62 // The most recent backing is done accumulating any more squashing layers.
63 if (hasMostRecentMapping) 63 if (hasMostRecentMapping)
64 mostRecentMapping->finishAccumulatingSquashingLayers(nextSquashedLayerIn dex); 64 mostRecentMapping->finishAccumulatingSquashingLayers(nextSquashedLayerIn dex);
65 65
66 nextSquashedLayerIndex = 0; 66 nextSquashedLayerIndex = 0;
67 boundingRect = IntRect(); 67 boundingRect = IntRect();
68 mostRecentMapping = newCompositedLayerMapping; 68 mostRecentMapping = newCompositedLayerMapping;
69 hasMostRecentMapping = hasNewCompositedLayerMapping; 69 hasMostRecentMapping = hasNewCompositedLayerMapping;
70 haveAssignedBackingsToEntireSquashingLayerSubtree = false; 70 haveAssignedBackingsToEntireSquashingLayerSubtree = false;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC hildren | PositiveZOrderChildren); 284 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC hildren | PositiveZOrderChildren);
285 while (RenderLayerStackingNode* curNode = iterator.next()) 285 while (RenderLayerStackingNode* curNode = iterator.next())
286 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingRepaint); 286 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingRepaint);
287 287
288 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer) 288 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer)
289 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; 289 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true;
290 } 290 }
291 291
292 } 292 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698