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

Unified Diff: Source/devtools/front_end/timeline/TimelineModelImpl.js

Issue 319743002: Timeline: decouple TimelineFrameModel from TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelineModelImpl.js
diff --git a/Source/devtools/front_end/timeline/TimelineModelImpl.js b/Source/devtools/front_end/timeline/TimelineModelImpl.js
index 7411d5d1aaa7ee565a6559b3598069b62a14070b..679c882a978e354905b253873fc38fbe80f0e1b3 100644
--- a/Source/devtools/front_end/timeline/TimelineModelImpl.js
+++ b/Source/devtools/front_end/timeline/TimelineModelImpl.js
@@ -42,13 +42,12 @@ WebInspector.TimelineModelImpl.prototype = {
this._clientInitiatedRecording = true;
this.reset();
var maxStackFrames = captureStacks ? 30 : 0;
- this._bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled();
var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled();
var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame,
WebInspector.TimelineModel.RecordType.DrawFrame,
WebInspector.TimelineModel.RecordType.RequestMainThreadFrame,
WebInspector.TimelineModel.RecordType.ActivateLayerTree ];
- this._timelineManager.start(maxStackFrames, this._bufferEvents, liveEvents.join(","), captureMemory, includeGPUEvents, this._fireRecordingStarted.bind(this));
+ this._timelineManager.start(maxStackFrames, WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled(), liveEvents.join(","), captureMemory, includeGPUEvents, this._fireRecordingStarted.bind(this));
},
stopRecording: function()
@@ -105,6 +104,9 @@ WebInspector.TimelineModelImpl.prototype = {
*/
_onStopped: function(event)
{
+ // If we were buffering events, discard those that got through, the real ones are coming!
+ if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled())
+ this.reset();
if (event.data) {
// Stopped from console.
this._fireRecordingStopped(null, null);
@@ -131,7 +133,6 @@ WebInspector.TimelineModelImpl.prototype = {
*/
_fireRecordingStopped: function(error, cpuProfile)
{
- this._bufferEvents = false;
this._collectionEnabled = false;
if (cpuProfile)
WebInspector.TimelineJSProfileProcessor.mergeJSProfileIntoTimeline(this, cpuProfile);
@@ -139,14 +140,6 @@ WebInspector.TimelineModelImpl.prototype = {
},
/**
- * @return {boolean}
- */
- bufferEvents: function()
- {
- return this._bufferEvents;
- },
-
- /**
* @param {!TimelineAgent.TimelineEvent} payload
*/
_addRecord: function(payload)
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698