| 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 24 matching lines...) Expand all Loading... |
| 35 /** | 35 /** |
| 36 * @param {function(string=)} showImageCallback | 36 * @param {function(string=)} showImageCallback |
| 37 */ | 37 */ |
| 38 constructor(showImageCallback) { | 38 constructor(showImageCallback) { |
| 39 super(true); | 39 super(true); |
| 40 this.registerRequiredCSS('layer_viewer/paintProfiler.css'); | 40 this.registerRequiredCSS('layer_viewer/paintProfiler.css'); |
| 41 this.contentElement.classList.add('paint-profiler-overview'); | 41 this.contentElement.classList.add('paint-profiler-overview'); |
| 42 this._canvasContainer = this.contentElement.createChild('div', 'paint-profil
er-canvas-container'); | 42 this._canvasContainer = this.contentElement.createChild('div', 'paint-profil
er-canvas-container'); |
| 43 this._progressBanner = this.contentElement.createChild('div', 'full-widget-d
immed-banner hidden'); | 43 this._progressBanner = this.contentElement.createChild('div', 'full-widget-d
immed-banner hidden'); |
| 44 this._progressBanner.textContent = Common.UIString('Profiling\u2026'); | 44 this._progressBanner.textContent = Common.UIString('Profiling\u2026'); |
| 45 this._pieChart = new UI.PieChart(55, this._formatPieChartTime.bind(this), tr
ue); | 45 this._pieChart = new Perf_UI.PieChart(55, this._formatPieChartTime.bind(this
), true); |
| 46 this._pieChart.element.classList.add('paint-profiler-pie-chart'); | 46 this._pieChart.element.classList.add('paint-profiler-pie-chart'); |
| 47 this.contentElement.appendChild(this._pieChart.element); | 47 this.contentElement.appendChild(this._pieChart.element); |
| 48 | 48 |
| 49 this._showImageCallback = showImageCallback; | 49 this._showImageCallback = showImageCallback; |
| 50 | 50 |
| 51 this._canvas = this._canvasContainer.createChild('canvas', 'fill'); | 51 this._canvas = this._canvasContainer.createChild('canvas', 'fill'); |
| 52 this._context = this._canvas.getContext('2d'); | 52 this._context = this._canvas.getContext('2d'); |
| 53 this._selectionWindow = new UI.OverviewGrid.Window(this._canvasContainer); | 53 this._selectionWindow = new Perf_UI.OverviewGrid.Window(this._canvasContaine
r); |
| 54 this._selectionWindow.addEventListener(UI.OverviewGrid.Events.WindowChanged,
this._onWindowChanged, this); | 54 this._selectionWindow.addEventListener(Perf_UI.OverviewGrid.Events.WindowCha
nged, this._onWindowChanged, this); |
| 55 | 55 |
| 56 this._innerBarWidth = 4 * window.devicePixelRatio; | 56 this._innerBarWidth = 4 * window.devicePixelRatio; |
| 57 this._minBarHeight = window.devicePixelRatio; | 57 this._minBarHeight = window.devicePixelRatio; |
| 58 this._barPaddingWidth = 2 * window.devicePixelRatio; | 58 this._barPaddingWidth = 2 * window.devicePixelRatio; |
| 59 this._outerBarWidth = this._innerBarWidth + this._barPaddingWidth; | 59 this._outerBarWidth = this._innerBarWidth + this._barPaddingWidth; |
| 60 this._pendingScale = 1; | 60 this._pendingScale = 1; |
| 61 this._scale = this._pendingScale; | 61 this._scale = this._pendingScale; |
| 62 | 62 |
| 63 this._reset(); | 63 this._reset(); |
| 64 } | 64 } |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 * @param {string} name | 556 * @param {string} name |
| 557 * @param {string} title | 557 * @param {string} title |
| 558 * @param {string} color | 558 * @param {string} color |
| 559 */ | 559 */ |
| 560 constructor(name, title, color) { | 560 constructor(name, title, color) { |
| 561 this.name = name; | 561 this.name = name; |
| 562 this.title = title; | 562 this.title = title; |
| 563 this.color = color; | 563 this.color = color; |
| 564 } | 564 } |
| 565 }; | 565 }; |
| OLD | NEW |