OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.TimelineModel} | 7 * @extends {WebInspector.TimelineModel} |
8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
9 */ | 9 */ |
10 WebInspector.TimelineModelImpl = function() | 10 WebInspector.TimelineModelImpl = function() |
(...skipping 27 matching lines...) Expand all Loading... |
38 targetRemoved: function(target) | 38 targetRemoved: function(target) |
39 { | 39 { |
40 if (this._currentTarget === target) | 40 if (this._currentTarget === target) |
41 this._currentTarget = null; | 41 this._currentTarget = null; |
42 }, | 42 }, |
43 | 43 |
44 /** | 44 /** |
45 * @param {boolean} captureStacks | 45 * @param {boolean} captureStacks |
46 * @param {boolean} captureMemory | 46 * @param {boolean} captureMemory |
47 * @param {boolean} capturePictures | 47 * @param {boolean} capturePictures |
| 48 * @param {boolean} captureInvalidationTracking |
48 */ | 49 */ |
49 startRecording: function(captureStacks, captureMemory, capturePictures) | 50 startRecording: function(captureStacks, captureMemory, capturePictures, capt
ureInvalidationTracking) |
50 { | 51 { |
51 console.assert(!capturePictures, "Legacy timeline does not support captu
ring pictures"); | 52 console.assert(!capturePictures, "Legacy timeline does not support captu
ring pictures"); |
| 53 console.assert(!captureInvalidationTracking, "Legacy timeline does not s
upport invalidation tracking."); |
52 this.reset(); | 54 this.reset(); |
53 this._currentTarget = WebInspector.context.flavor(WebInspector.Target); | 55 this._currentTarget = WebInspector.context.flavor(WebInspector.Target); |
54 console.assert(this._currentTarget); | 56 console.assert(this._currentTarget); |
55 | 57 |
56 this._clientInitiatedRecording = true; | 58 this._clientInitiatedRecording = true; |
57 var maxStackFrames = captureStacks ? 30 : 0; | 59 var maxStackFrames = captureStacks ? 30 : 0; |
58 var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEn
abled(); | 60 var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEn
abled(); |
59 var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame, | 61 var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame, |
60 WebInspector.TimelineModel.RecordType.DrawFrame, | 62 WebInspector.TimelineModel.RecordType.DrawFrame, |
61 WebInspector.TimelineModel.RecordType.RequestMainThre
adFrame, | 63 WebInspector.TimelineModel.RecordType.RequestMainThre
adFrame, |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 break; | 632 break; |
631 length += itemLength; | 633 length += itemLength; |
632 data.push(item); | 634 data.push(item); |
633 ++this._recordIndex; | 635 ++this._recordIndex; |
634 } | 636 } |
635 if (this._recordIndex === this._payloads.length) | 637 if (this._recordIndex === this._payloads.length) |
636 data.push(data.pop() + "]"); | 638 data.push(data.pop() + "]"); |
637 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 639 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
638 } | 640 } |
639 } | 641 } |
OLD | NEW |