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

Unified Diff: Source/devtools/front_end/TimelineModel.js

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/TimelineManager.js ('k') | Source/devtools/front_end/TimelinePanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TimelineModel.js
diff --git a/Source/devtools/front_end/TimelineModel.js b/Source/devtools/front_end/TimelineModel.js
index 347f744bc0dfd99a73efe6b90f1b98d205e9961a..0a91d89377933e8c6b0c9a227e4ce0637fbf9d56 100644
--- a/Source/devtools/front_end/TimelineModel.js
+++ b/Source/devtools/front_end/TimelineModel.js
@@ -51,6 +51,8 @@ WebInspector.TimelineModel.RecordType = {
Program: "Program",
EventDispatch: "EventDispatch",
+ GPUTask: "GPUTask",
+
BeginFrame: "BeginFrame",
ScheduleStyleRecalculation: "ScheduleStyleRecalculation",
RecalculateStyles: "RecalculateStyles",
@@ -115,7 +117,7 @@ WebInspector.TimelineModel.startTimeInSeconds = function(record)
WebInspector.TimelineModel.endTimeInSeconds = function(record)
{
- return (typeof record.endTime === "undefined" ? record.startTime : record.endTime) / 1000;
+ return (record.endTime || record.startTime) / 1000;
}
WebInspector.TimelineModel.durationInSeconds = function(record)
@@ -159,7 +161,8 @@ WebInspector.TimelineModel.prototype = {
this._clientInitiatedRecording = true;
this.reset();
var maxStackFrames = WebInspector.settings.timelineLimitStackFramesFlag.get() ? WebInspector.settings.timelineStackFramesToCapture.get() : 30;
- WebInspector.timelineManager.start(maxStackFrames, includeDomCounters, this._fireRecordingStarted.bind(this));
+ var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled();
+ WebInspector.timelineManager.start(maxStackFrames, includeDomCounters, includeGPUEvents, this._fireRecordingStarted.bind(this));
},
stopRecording: function()
@@ -172,7 +175,7 @@ WebInspector.TimelineModel.prototype = {
WebInspector.timelineManager.stop(this._fireRecordingStopped.bind(this));
}
- WebInspector.timelineManager.start(undefined, undefined, stopTimeline.bind(this));
+ WebInspector.timelineManager.start(undefined, undefined, undefined, stopTimeline.bind(this));
return;
}
this._clientInitiatedRecording = false;
« no previous file with comments | « Source/devtools/front_end/TimelineManager.js ('k') | Source/devtools/front_end/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698