OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 replay(firstStep, lastStep, scale) { | 93 replay(firstStep, lastStep, scale) { |
94 return this._target.layerTreeAgent().replaySnapshot( | 94 return this._target.layerTreeAgent().replaySnapshot( |
95 this._id, firstStep || undefined, lastStep || undefined, scale || 1.0, (
error, str) => error ? null : str); | 95 this._id, firstStep || undefined, lastStep || undefined, scale || 1.0, (
error, str) => error ? null : str); |
96 } | 96 } |
97 | 97 |
98 /** | 98 /** |
99 * @param {?Protocol.DOM.Rect} clipRect | 99 * @param {?Protocol.DOM.Rect} clipRect |
100 * @param {function(!Array.<!Protocol.LayerTree.PaintProfile>=)} callback | 100 * @param {function(!Array.<!Protocol.LayerTree.PaintProfile>=)} callback |
101 */ | 101 */ |
102 profile(clipRect, callback) { | 102 profile(clipRect, callback) { |
103 var wrappedCallback = InspectorBackend.wrapClientCallback(callback, 'Protoco
l.LayerTree.profileSnapshot(): '); | 103 var wrappedCallback = |
| 104 Protocol.inspectorBackend.wrapClientCallback(callback, 'Protocol.LayerTr
ee.profileSnapshot(): '); |
104 this._target.layerTreeAgent().profileSnapshot(this._id, 5, 1, clipRect || un
defined, wrappedCallback); | 105 this._target.layerTreeAgent().profileSnapshot(this._id, 5, 1, clipRect || un
defined, wrappedCallback); |
105 } | 106 } |
106 | 107 |
107 /** | 108 /** |
108 * @return {!Promise<?Array<!SDK.PaintProfilerLogItem>>} | 109 * @return {!Promise<?Array<!SDK.PaintProfilerLogItem>>} |
109 */ | 110 */ |
110 commandLog() { | 111 commandLog() { |
111 return this._target.layerTreeAgent().snapshotCommandLog(this._id, processLog
); | 112 return this._target.layerTreeAgent().snapshotCommandLog(this._id, processLog
); |
112 | 113 |
113 /** | 114 /** |
(...skipping 23 matching lines...) Expand all Loading... |
137 /** | 138 /** |
138 * @param {!SDK.RawPaintProfilerLogItem} rawEntry | 139 * @param {!SDK.RawPaintProfilerLogItem} rawEntry |
139 * @param {number} commandIndex | 140 * @param {number} commandIndex |
140 */ | 141 */ |
141 constructor(rawEntry, commandIndex) { | 142 constructor(rawEntry, commandIndex) { |
142 this.method = rawEntry.method; | 143 this.method = rawEntry.method; |
143 this.params = rawEntry.params; | 144 this.params = rawEntry.params; |
144 this.commandIndex = commandIndex; | 145 this.commandIndex = commandIndex; |
145 } | 146 } |
146 }; | 147 }; |
OLD | NEW |