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

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

Issue 46663010: DevTools: Show GPU utilization bar on timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tune PID to hue magic const 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return data.release(); 213 return data.release();
214 } 214 }
215 215
216 PassRefPtr<JSONObject> TimelineRecordFactory::createAnimationFrameData(int callb ackId) 216 PassRefPtr<JSONObject> TimelineRecordFactory::createAnimationFrameData(int callb ackId)
217 { 217 {
218 RefPtr<JSONObject> data = JSONObject::create(); 218 RefPtr<JSONObject> data = JSONObject::create();
219 data->setNumber("id", callbackId); 219 data->setNumber("id", callbackId);
220 return data.release(); 220 return data.release();
221 } 221 }
222 222
223 PassRefPtr<JSONObject> TimelineRecordFactory::createGPUTaskData(unsigned ownerPI D)
224 {
225 RefPtr<JSONObject> data = JSONObject::create();
226 data->setNumber("ownerPID", ownerPID);
227 return data.release();
228 }
229
223 static PassRefPtr<JSONArray> createQuad(const FloatQuad& quad) 230 static PassRefPtr<JSONArray> createQuad(const FloatQuad& quad)
224 { 231 {
225 RefPtr<JSONArray> array = JSONArray::create(); 232 RefPtr<JSONArray> array = JSONArray::create();
226 array->pushNumber(quad.p1().x()); 233 array->pushNumber(quad.p1().x());
227 array->pushNumber(quad.p1().y()); 234 array->pushNumber(quad.p1().y());
228 array->pushNumber(quad.p2().x()); 235 array->pushNumber(quad.p2().x());
229 array->pushNumber(quad.p2().y()); 236 array->pushNumber(quad.p2().y());
230 array->pushNumber(quad.p3().x()); 237 array->pushNumber(quad.p3().x());
231 array->pushNumber(quad.p3().y()); 238 array->pushNumber(quad.p3().y());
232 array->pushNumber(quad.p4().x()); 239 array->pushNumber(quad.p4().x());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 void TimelineRecordFactory::appendImageDetails(JSONObject* data, long long image ElementId, const String& url) 283 void TimelineRecordFactory::appendImageDetails(JSONObject* data, long long image ElementId, const String& url)
277 { 284 {
278 if (imageElementId) 285 if (imageElementId)
279 data->setNumber("elementId", imageElementId); 286 data->setNumber("elementId", imageElementId);
280 if (!url.isEmpty()) 287 if (!url.isEmpty())
281 data->setString("url", url); 288 data->setString("url", url);
282 } 289 }
283 290
284 } // namespace WebCore 291 } // namespace WebCore
285 292
OLDNEW
« no previous file with comments | « Source/core/inspector/TimelineRecordFactory.h ('k') | Source/core/inspector/TimelineTraceEventProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698