| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 /** | 6 /** |
| 7 * @fileoverview TimelineView visualizes GPU_TRACE events using the | 7 * @fileoverview TimelineView visualizes GPU_TRACE events using the |
| 8 * gpu.Timeline component. | 8 * gpu.Timeline component. |
| 9 */ | 9 */ |
| 10 cr.define('gpu', function() { | 10 cr.define('gpu', function() { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 text += ' ' + | 133 text += ' ' + |
| 134 leftAlign(sliceGroupTitle, 55) + ': ' + | 134 leftAlign(sliceGroupTitle, 55) + ': ' + |
| 135 rightAlign(tsRound(duration) + 'ms', 12) + ' ' + | 135 rightAlign(tsRound(duration) + 'ms', 12) + ' ' + |
| 136 rightAlign(String(sliceGroup.slices.length), 5) + ' occurrences' + | 136 rightAlign(String(sliceGroup.slices.length), 5) + ' occurrences' + |
| 137 '\n'; | 137 '\n'; |
| 138 } | 138 } |
| 139 | 139 |
| 140 text += leftAlign('*Totals', 55) + ' : ' + | 140 text += leftAlign('*Totals', 55) + ' : ' + |
| 141 rightAlign(tsRound(totalDuration) + 'ms', 12) + ' ' + | 141 rightAlign(tsRound(totalDuration) + 'ms', 12) + ' ' + |
| 142 rightAlign(String(selection.length), 5) + ' occurrences' + | 142 rightAlign(String(selection.length), 5) + ' occurrences' + |
| 143 '\n'; | 143 '\n'; |
| 144 | 144 |
| 145 text += '\n'; | 145 text += '\n'; |
| 146 | 146 |
| 147 text += leftAlign('Selection start', 55) + ' : ' + | 147 text += leftAlign('Selection start', 55) + ' : ' + |
| 148 rightAlign(tsRound(tsLo) + 'ms', 12) + | 148 rightAlign(tsRound(tsLo) + 'ms', 12) + |
| 149 '\n'; | 149 '\n'; |
| 150 text += leftAlign('Selection extent', 55) + ' : ' + | 150 text += leftAlign('Selection extent', 55) + ' : ' + |
| 151 rightAlign(tsRound(tsHi - tsLo) + 'ms', 12) + | 151 rightAlign(tsRound(tsHi - tsLo) + 'ms', 12) + |
| 152 '\n'; | 152 '\n'; |
| 153 | 153 |
| 154 // done | 154 // done |
| 155 var outputDiv = $('timeline-selection-summary'); | 155 var outputDiv = $('timeline-selection-summary'); |
| 156 outputDiv.innerHTML = text; | 156 outputDiv.innerHTML = text; |
| 157 } | 157 } |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 return { | 160 return { |
| 161 TimelineView: TimelineView | 161 TimelineView: TimelineView |
| 162 }; | 162 }; |
| 163 }); | 163 }); |
| OLD | NEW |