| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @implements {UI.FlameChartDataProvider} | 32 * @implements {UI.FlameChartDataProvider} |
| 33 * @unrestricted | 33 * @unrestricted |
| 34 */ | 34 */ |
| 35 Profiler.ProfileFlameChartDataProvider = class { | 35 Profiler.ProfileFlameChartDataProvider = class { |
| 36 /** | 36 constructor() { |
| 37 * @param {?SDK.Target} target | |
| 38 */ | |
| 39 constructor(target) { | |
| 40 UI.FlameChartDataProvider.call(this); | 37 UI.FlameChartDataProvider.call(this); |
| 41 this._target = target; | |
| 42 this._colorGenerator = Profiler.ProfileFlameChartDataProvider.colorGenerator
(); | 38 this._colorGenerator = Profiler.ProfileFlameChartDataProvider.colorGenerator
(); |
| 43 } | 39 } |
| 44 | 40 |
| 45 /** | 41 /** |
| 46 * @return {!UI.FlameChart.ColorGenerator} | 42 * @return {!UI.FlameChart.ColorGenerator} |
| 47 */ | 43 */ |
| 48 static colorGenerator() { | 44 static colorGenerator() { |
| 49 if (!Profiler.ProfileFlameChartDataProvider._colorGenerator) { | 45 if (!Profiler.ProfileFlameChartDataProvider._colorGenerator) { |
| 50 var colorGenerator = new UI.FlameChart.ColorGenerator( | 46 var colorGenerator = new UI.FlameChart.ColorGenerator( |
| 51 {min: 30, max: 330}, {min: 50, max: 80, count: 5}, {min: 80, max: 90,
count: 3}); | 47 {min: 30, max: 330}, {min: 50, max: 80, count: 5}, {min: 80, max: 90,
count: 3}); |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 * @param {number} height | 588 * @param {number} height |
| 593 */ | 589 */ |
| 594 _resetCanvas(width, height) { | 590 _resetCanvas(width, height) { |
| 595 var ratio = window.devicePixelRatio; | 591 var ratio = window.devicePixelRatio; |
| 596 this._overviewCanvas.width = width * ratio; | 592 this._overviewCanvas.width = width * ratio; |
| 597 this._overviewCanvas.height = height * ratio; | 593 this._overviewCanvas.height = height * ratio; |
| 598 this._overviewCanvas.style.width = width + 'px'; | 594 this._overviewCanvas.style.width = width + 'px'; |
| 599 this._overviewCanvas.style.height = height + 'px'; | 595 this._overviewCanvas.style.height = height + 'px'; |
| 600 } | 596 } |
| 601 }; | 597 }; |
| OLD | NEW |