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

Side by Side Diff: Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 27030009: Revert "Make compositingState explicit (re-land #2 with bogus ASSERT removed)" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build error Created 7 years, 2 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 return; 197 return;
198 } 198 }
199 RenderLayer* enclosingLayer = renderer->enclosingLayer(); 199 RenderLayer* enclosingLayer = renderer->enclosingLayer();
200 GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositing Layer()->compositedLayerMapping()->childForSuperlayers(); 200 GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositing Layer()->compositedLayerMapping()->childForSuperlayers();
201 buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap); 201 buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap);
202 gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers); 202 gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers);
203 } 203 }
204 204
205 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(ErrorString* errorString, RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap) 205 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(ErrorString* errorString, RenderLayer* root, LayerIdToNodeIdMap& layerIdToNodeIdMap)
206 { 206 {
207 if (root->compositedLayerMapping()) { 207 if (root->isComposited()) {
208 if (Node* node = root->renderer()->generatingNode()) { 208 if (Node* node = root->renderer()->generatingNode()) {
209 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child ForSuperlayers(); 209 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child ForSuperlayers();
210 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo de(errorString, node)); 210 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo de(errorString, node));
211 } 211 }
212 } 212 }
213 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl ing()) 213 for (RenderLayer* child = root->firstChild(); child; child = child->nextSibl ing())
214 buildLayerIdToNodeIdMap(errorString, child, layerIdToNodeIdMap); 214 buildLayerIdToNodeIdMap(errorString, child, layerIdToNodeIdMap);
215 if (!root->renderer()->isRenderIFrame()) 215 if (!root->renderer()->isRenderIFrame())
216 return; 216 return;
217 FrameView* childFrameView = toFrameView(toRenderWidget(root->renderer())->wi dget()); 217 FrameView* childFrameView = toFrameView(toRenderWidget(root->renderer())->wi dget());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 continue; 324 continue;
325 reasonStrings->addItem(compositingReasonNames[i].protocolName); 325 reasonStrings->addItem(compositingReasonNames[i].protocolName);
326 #ifndef _NDEBUG 326 #ifndef _NDEBUG
327 reasonsBitmask &= ~compositingReasonNames[i].mask; 327 reasonsBitmask &= ~compositingReasonNames[i].mask;
328 #endif 328 #endif
329 } 329 }
330 ASSERT(!reasonsBitmask); 330 ASSERT(!reasonsBitmask);
331 } 331 }
332 332
333 } // namespace WebCore 333 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/animation/KeyframeAnimation.cpp ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698