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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 .setY(rect.y()) 178 .setY(rect.y())
179 .setWidth(rect.width()) 179 .setWidth(rect.width())
180 .setHeight(rect.height()); 180 .setHeight(rect.height());
181 m_frontend->layerPainted(idForLayer(graphicsLayer), domRect.release()); 181 m_frontend->layerPainted(idForLayer(graphicsLayer), domRect.release());
182 } 182 }
183 183
184 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > InspectorLayerTre eAgent::buildLayerTree() 184 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > InspectorLayerTre eAgent::buildLayerTree()
185 { 185 {
186 RenderLayerCompositor* compositor = renderLayerCompositor(); 186 RenderLayerCompositor* compositor = renderLayerCompositor();
187 if (!compositor || !compositor->inCompositingMode()) 187 if (!compositor || !compositor->inCompositingMode())
188 return 0; 188 return nullptr;
189 LayerIdToNodeIdMap layerIdToNodeIdMap; 189 LayerIdToNodeIdMap layerIdToNodeIdMap;
190 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil der::Array<TypeBuilder::LayerTree::Layer>::create(); 190 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil der::Array<TypeBuilder::LayerTree::Layer>::create();
191 buildLayerIdToNodeIdMap(compositor->rootRenderLayer(), layerIdToNodeIdMap); 191 buildLayerIdToNodeIdMap(compositor->rootRenderLayer(), layerIdToNodeIdMap);
192 gatherGraphicsLayers(compositor->rootGraphicsLayer(), layerIdToNodeIdMap, la yers); 192 gatherGraphicsLayers(compositor->rootGraphicsLayer(), layerIdToNodeIdMap, la yers);
193 return layers.release(); 193 return layers.release();
194 } 194 }
195 195
196 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(RenderLayer* root, LayerId ToNodeIdMap& layerIdToNodeIdMap) 196 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(RenderLayer* root, LayerId ToNodeIdMap& layerIdToNodeIdMap)
197 { 197 {
198 if (root->hasCompositedLayerMapping()) { 198 if (root->hasCompositedLayerMapping()) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 for (size_t i = 0; i < timings->size(); ++i) { 378 for (size_t i = 0; i < timings->size(); ++i) {
379 const Vector<double>& row = (*timings)[i]; 379 const Vector<double>& row = (*timings)[i];
380 RefPtr<TypeBuilder::Array<double> > outRow = TypeBuilder::Array<double>: :create(); 380 RefPtr<TypeBuilder::Array<double> > outRow = TypeBuilder::Array<double>: :create();
381 for (size_t j = 1; j < row.size(); ++j) 381 for (size_t j = 1; j < row.size(); ++j)
382 outRow->addItem(row[j] - row[j - 1]); 382 outRow->addItem(row[j] - row[j - 1]);
383 outTimings->addItem(outRow.release()); 383 outTimings->addItem(outRow.release());
384 } 384 }
385 } 385 }
386 386
387 } // namespace WebCore 387 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.cpp ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698