| 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 * @param {!WebInspector.TracingModel} tracingModel | 6 * @param {!WebInspector.TracingModel} tracingModel |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {WebInspector.TimelineModel} | 8 * @extends {WebInspector.TimelineModel} |
| 9 */ | 9 */ |
| 10 WebInspector.TracingTimelineModel = function(tracingModel) | 10 WebInspector.TracingTimelineModel = function(tracingModel) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 DecodeImage: "Decode Image", | 86 DecodeImage: "Decode Image", |
| 87 ResizeImage: "Resize Image", | 87 ResizeImage: "Resize Image", |
| 88 DrawLazyPixelRef: "Draw LazyPixelRef", | 88 DrawLazyPixelRef: "Draw LazyPixelRef", |
| 89 DecodeLazyPixelRef: "Decode LazyPixelRef", | 89 DecodeLazyPixelRef: "Decode LazyPixelRef", |
| 90 | 90 |
| 91 LazyPixelRef: "LazyPixelRef", | 91 LazyPixelRef: "LazyPixelRef", |
| 92 LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl" | 92 LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl" |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 WebInspector.TracingTimelineModel.Events = { | |
| 96 TracingComplete: "TracingComplete" | |
| 97 }; | |
| 98 | |
| 99 WebInspector.TracingTimelineModel.defaultTracingCategoryFilter = "*,disabled-by-
default-cc.debug,disabled-by-default-devtools.timeline"; | 95 WebInspector.TracingTimelineModel.defaultTracingCategoryFilter = "*,disabled-by-
default-cc.debug,disabled-by-default-devtools.timeline"; |
| 100 | 96 |
| 101 WebInspector.TracingTimelineModel.prototype = { | 97 WebInspector.TracingTimelineModel.prototype = { |
| 102 /** | 98 /** |
| 103 * @param {boolean} captureStacks | 99 * @param {boolean} captureStacks |
| 104 * @param {boolean} captureMemory | 100 * @param {boolean} captureMemory |
| 105 */ | 101 */ |
| 106 startRecording: function(captureStacks, captureMemory) | 102 startRecording: function(captureStacks, captureMemory) |
| 107 { | 103 { |
| 108 var categories; | 104 var categories; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 if (i + 1 < length) | 158 if (i + 1 < length) |
| 163 endTime = events[i + 1].startTime; | 159 endTime = events[i + 1].startTime; |
| 164 | 160 |
| 165 process.sortedThreads().forEach(this._processThreadEvents.bind(this,
startTime, endTime, event.thread)); | 161 process.sortedThreads().forEach(this._processThreadEvents.bind(this,
startTime, endTime, event.thread)); |
| 166 } | 162 } |
| 167 this._resetProcessingState(); | 163 this._resetProcessingState(); |
| 168 | 164 |
| 169 this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compare
StartTime); | 165 this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compare
StartTime); |
| 170 | 166 |
| 171 this._buildTimelineRecords(); | 167 this._buildTimelineRecords(); |
| 172 this.dispatchEventToListeners(WebInspector.TracingTimelineModel.Events.T
racingComplete); | |
| 173 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.Recordin
gStopped); | 168 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.Recordin
gStopped); |
| 174 }, | 169 }, |
| 175 | 170 |
| 176 /** | 171 /** |
| 177 * @return {?number} | 172 * @return {?number} |
| 178 */ | 173 */ |
| 179 minimumRecordTime: function() | 174 minimumRecordTime: function() |
| 180 { | 175 { |
| 181 return this._tracingModel.minimumRecordTime(); | 176 return this._tracingModel.minimumRecordTime(); |
| 182 }, | 177 }, |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 { | 642 { |
| 648 var tokens = [this.title()]; | 643 var tokens = [this.title()]; |
| 649 var data = this._event.args.data; | 644 var data = this._event.args.data; |
| 650 if (data) { | 645 if (data) { |
| 651 for (var key in data) | 646 for (var key in data) |
| 652 tokens.push(data[key]); | 647 tokens.push(data[key]); |
| 653 } | 648 } |
| 654 return regExp.test(tokens.join("|")); | 649 return regExp.test(tokens.join("|")); |
| 655 } | 650 } |
| 656 } | 651 } |
| OLD | NEW |