| 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 * @param {!WebInspector.TracingModel} tracingModel | 7 * @param {!WebInspector.TracingModel} tracingModel |
| 8 * @param {!WebInspector.TimelineModel.Filter} recordFilter | 8 * @param {!WebInspector.TimelineModel.Filter} recordFilter |
| 9 * @extends {WebInspector.TimelineModel} | 9 * @extends {WebInspector.TimelineModel} |
| 10 */ | 10 */ |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 DecodeImage: "Decode Image", | 89 DecodeImage: "Decode Image", |
| 90 ResizeImage: "Resize Image", | 90 ResizeImage: "Resize Image", |
| 91 DrawLazyPixelRef: "Draw LazyPixelRef", | 91 DrawLazyPixelRef: "Draw LazyPixelRef", |
| 92 DecodeLazyPixelRef: "Decode LazyPixelRef", | 92 DecodeLazyPixelRef: "Decode LazyPixelRef", |
| 93 | 93 |
| 94 LazyPixelRef: "LazyPixelRef", | 94 LazyPixelRef: "LazyPixelRef", |
| 95 LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl", | 95 LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl", |
| 96 PictureSnapshot: "cc::Picture" | 96 PictureSnapshot: "cc::Picture" |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 WebInspector.TracingTimelineModel.defaultTracingCategoryFilter = "-*,disabled-by
-default-cc.debug,disabled-by-default-devtools.timeline,disabled-by-default-devt
ools.timeline.frame"; | |
| 100 | |
| 101 WebInspector.TracingTimelineModel.prototype = { | 99 WebInspector.TracingTimelineModel.prototype = { |
| 102 /** | 100 /** |
| 103 * @param {boolean} captureStacks | 101 * @param {boolean} captureStacks |
| 104 * @param {boolean} captureMemory | 102 * @param {boolean} captureMemory |
| 105 * @param {boolean} capturePictures | 103 * @param {boolean} capturePictures |
| 106 */ | 104 */ |
| 107 startRecording: function(captureStacks, captureMemory, capturePictures) | 105 startRecording: function(captureStacks, captureMemory, capturePictures) |
| 108 { | 106 { |
| 109 function disabledByDefault(category) | 107 function disabledByDefault(category) |
| 110 { | 108 { |
| 111 return "disabled-by-default-" + category; | 109 return "disabled-by-default-" + category; |
| 112 } | 110 } |
| 113 var categories; | 111 var categoriesArray = ["-*", disabledByDefault("devtools.timeline"), dis
abledByDefault("devtools.timeline.frame")]; |
| 114 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()) { | 112 if (captureStacks) |
| 115 categories = WebInspector.TracingTimelineModel.defaultTracingCategor
yFilter; | 113 categoriesArray.push(disabledByDefault("devtools.timeline.stack")); |
| 116 } else { | 114 if (capturePictures) { |
| 117 var categoriesArray = ["-*", disabledByDefault("devtools.timeline"),
disabledByDefault("devtools.timeline.frame")]; | 115 categoriesArray = categoriesArray.concat([ |
| 118 if (captureStacks) | 116 disabledByDefault("devtools.timeline.layers"), |
| 119 categoriesArray.push(disabledByDefault("devtools.timeline.stack"
)); | 117 disabledByDefault("devtools.timeline.picture"), |
| 120 if (capturePictures) { | 118 disabledByDefault("blink.graphics_context_annotations")]); |
| 121 categoriesArray = categoriesArray.concat([ | |
| 122 disabledByDefault("devtools.timeline.layers"), | |
| 123 disabledByDefault("devtools.timeline.picture"), | |
| 124 disabledByDefault("blink.graphics_context_annotations")]); | |
| 125 } | |
| 126 categories = categoriesArray.join(","); | |
| 127 } | 119 } |
| 120 var categories = categoriesArray.join(","); |
| 128 this._startRecordingWithCategories(categories); | 121 this._startRecordingWithCategories(categories); |
| 129 }, | 122 }, |
| 130 | 123 |
| 131 stopRecording: function() | 124 stopRecording: function() |
| 132 { | 125 { |
| 133 this._tracingModel.stop(this._didStopRecordingTraceEvents.bind(this)); | 126 this._tracingModel.stop(this._didStopRecordingTraceEvents.bind(this)); |
| 134 }, | 127 }, |
| 135 | 128 |
| 136 /** | 129 /** |
| 137 * @param {string} sessionId | 130 * @param {string} sessionId |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 }, | 754 }, |
| 762 | 755 |
| 763 /** | 756 /** |
| 764 * @return {!WebInspector.TimelineModel} | 757 * @return {!WebInspector.TimelineModel} |
| 765 */ | 758 */ |
| 766 timelineModel: function() | 759 timelineModel: function() |
| 767 { | 760 { |
| 768 return this._model; | 761 return this._model; |
| 769 } | 762 } |
| 770 } | 763 } |
| OLD | NEW |