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

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

Issue 54273005: DevTools: add ids to compositor frames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return createNodeData(rootNodeId); 247 return createNodeData(rootNodeId);
248 } 248 }
249 249
250 PassRefPtr<JSONObject> TimelineRecordFactory::createPaintData(const FloatQuad& q uad, long long layerRootNodeId) 250 PassRefPtr<JSONObject> TimelineRecordFactory::createPaintData(const FloatQuad& q uad, long long layerRootNodeId)
251 { 251 {
252 RefPtr<JSONObject> data = TimelineRecordFactory::createLayerData(layerRootNo deId); 252 RefPtr<JSONObject> data = TimelineRecordFactory::createLayerData(layerRootNo deId);
253 data->setArray("clip", createQuad(quad)); 253 data->setArray("clip", createQuad(quad));
254 return data.release(); 254 return data.release();
255 } 255 }
256 256
257 PassRefPtr<JSONObject> TimelineRecordFactory::createFrameData(int frameId)
258 {
259 RefPtr<JSONObject> data = JSONObject::create();
260 data->setNumber("id", frameId);
261 return data.release();
262 }
263
257 void TimelineRecordFactory::appendLayoutRoot(JSONObject* data, const FloatQuad& quad, long long rootNodeId) 264 void TimelineRecordFactory::appendLayoutRoot(JSONObject* data, const FloatQuad& quad, long long rootNodeId)
258 { 265 {
259 data->setArray("root", createQuad(quad)); 266 data->setArray("root", createQuad(quad));
260 if (rootNodeId) 267 if (rootNodeId)
261 data->setNumber("rootNode", rootNodeId); 268 data->setNumber("rootNode", rootNodeId);
262 } 269 }
263 270
264 void TimelineRecordFactory::appendStyleRecalcDetails(JSONObject* data, unsigned elementCount) 271 void TimelineRecordFactory::appendStyleRecalcDetails(JSONObject* data, unsigned elementCount)
265 { 272 {
266 data->setNumber("elementCount", elementCount); 273 data->setNumber("elementCount", elementCount);
267 } 274 }
268 275
269 void TimelineRecordFactory::appendImageDetails(JSONObject* data, long long image ElementId, const String& url) 276 void TimelineRecordFactory::appendImageDetails(JSONObject* data, long long image ElementId, const String& url)
270 { 277 {
271 if (imageElementId) 278 if (imageElementId)
272 data->setNumber("elementId", imageElementId); 279 data->setNumber("elementId", imageElementId);
273 if (!url.isEmpty()) 280 if (!url.isEmpty())
274 data->setString("url", url); 281 data->setString("url", url);
275 } 282 }
276 283
277 } // namespace WebCore 284 } // namespace WebCore
278 285
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698