| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <link rel="import" href="/tracing/model/async_slice.html"> | 7 <link rel="import" href="/tracing/model/async_slice.html"> |
| 8 | 8 |
| 9 <script> | 9 <script> |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 tr.exportTo('tr.e.gpu', function() { | 12 tr.exportTo('tr.e.gpu', function() { |
| 13 var AsyncSlice = tr.model.AsyncSlice; | 13 var AsyncSlice = tr.model.AsyncSlice; |
| 14 | 14 |
| 15 function GpuAsyncSlice() { | 15 function GpuAsyncSlice() { |
| 16 AsyncSlice.apply(this, arguments); | 16 AsyncSlice.apply(this, arguments); |
| 17 } | 17 } |
| 18 | 18 |
| 19 GpuAsyncSlice.prototype = { | 19 GpuAsyncSlice.prototype = { |
| 20 __proto__: AsyncSlice.prototype, | 20 __proto__: AsyncSlice.prototype, |
| 21 | 21 |
| 22 get viewSubGroupTitle() { | 22 get viewSubGroupTitle() { |
| 23 if (this.args.channel) { | 23 if (this.args.channel) { |
| 24 if (this.category === 'disabled-by-default-gpu.device') | 24 if (this.category === 'disabled-by-default-gpu.device') { |
| 25 return 'Device.' + this.args.channel; | 25 return 'Device.' + this.args.channel; |
| 26 } |
| 26 return 'Service.' + this.args.channel; | 27 return 'Service.' + this.args.channel; |
| 27 } | 28 } |
| 28 return this.title; | 29 return this.title; |
| 29 } | 30 } |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 AsyncSlice.subTypes.register( | 33 AsyncSlice.subTypes.register( |
| 33 GpuAsyncSlice, | 34 GpuAsyncSlice, |
| 34 { | 35 { |
| 35 categoryParts: ['disabled-by-default-gpu.device', | 36 categoryParts: ['disabled-by-default-gpu.device', |
| 36 'disabled-by-default-gpu.service'] | 37 'disabled-by-default-gpu.service'] |
| 37 }); | 38 }); |
| 38 | 39 |
| 39 return { | 40 return { |
| 40 GpuAsyncSlice, | 41 GpuAsyncSlice, |
| 41 }; | 42 }; |
| 42 }); | 43 }); |
| 43 </script> | 44 </script> |
| OLD | NEW |