Index: Source/devtools/front_end/TimelineModel.js |
diff --git a/Source/devtools/front_end/TimelineModel.js b/Source/devtools/front_end/TimelineModel.js |
index 7c43529dc518bd8a35bfa1a17a54997aa8e26e57..a289e5e8a6ecd969fc03c3b61a266fbd2e83f0f4 100644 |
--- a/Source/devtools/front_end/TimelineModel.js |
+++ b/Source/devtools/front_end/TimelineModel.js |
@@ -213,23 +213,25 @@ WebInspector.TimelineModel.prototype = { |
this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordFilterChanged); |
}, |
- /** |
- * @param {boolean=} includeCounters |
- */ |
- startRecording: function(includeCounters) |
+ startRecording: function() |
{ |
this._clientInitiatedRecording = true; |
this.reset(); |
var maxStackFrames = WebInspector.settings.timelineCaptureStacks.get() ? 30 : 0; |
- var bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() && !WebInspector.settings.timelineLiveUpdate.get(); |
+ this._bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() && !WebInspector.settings.timelineLiveUpdate.get(); |
var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled(); |
- WebInspector.timelineManager.start(maxStackFrames, bufferEvents, includeCounters, includeGPUEvents, this._fireRecordingStarted.bind(this)); |
+ var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame, |
+ WebInspector.TimelineModel.RecordType.DrawFrame, |
caseq
2014/03/26 16:21:06
Wring indent
|
+ WebInspector.TimelineModel.RecordType.RequestMainThreadFrame, |
+ WebInspector.TimelineModel.RecordType.ActivateLayerTree ]; |
+ var includeCounters = true; |
+ WebInspector.timelineManager.start(maxStackFrames, this._bufferEvents, liveEvents.join(","), includeCounters, includeGPUEvents, this._fireRecordingStarted.bind(this)); |
}, |
stopRecording: function() |
{ |
if (!this._clientInitiatedRecording) { |
- WebInspector.timelineManager.start(undefined, undefined, undefined, undefined, stopTimeline.bind(this)); |
+ WebInspector.timelineManager.start(undefined, undefined, undefined, undefined, undefined, stopTimeline.bind(this)); |
return; |
} |
@@ -298,13 +300,25 @@ WebInspector.TimelineModel.prototype = { |
*/ |
_fireRecordingStopped: function(error, events) |
{ |
+ this._bufferEvents = false; |
this._collectionEnabled = false; |
- for (var i = 0; events && i < events.length; ++i) |
- this._addRecord(events[i]); |
+ if (events && events.length) { |
+ this.reset(); |
+ for (var i = 0; i < events.length; ++i) |
+ this._addRecord(events[i]); |
+ } |
this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped); |
}, |
/** |
+ * @return {boolean} |
+ */ |
+ bufferEvents: function() |
+ { |
+ return this._bufferEvents; |
+ }, |
+ |
+ /** |
* @param {!TimelineAgent.TimelineEvent} payload |
*/ |
_addRecord: function(payload) |