| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| <link rel="import" href="/model/async_slice.html"> |
| |
| <script> |
| 'use strict'; |
| |
| tr.exportTo('tr.e.gpu', function() { |
| var AsyncSlice = tr.model.AsyncSlice; |
| |
| function GpuAsyncSlice() { |
| AsyncSlice.apply(this, arguments); |
| } |
| |
| GpuAsyncSlice.prototype = { |
| __proto__: AsyncSlice.prototype, |
| |
| get viewSubGroupTitle() { |
| if (this.args.channel) { |
| if (this.category == 'disabled-by-default-gpu.device') |
| return 'Device.' + this.args.channel; |
| else |
| return 'Service.' + this.args.channel; |
| } |
| return this.title; |
| } |
| }; |
| |
| AsyncSlice.register( |
| GpuAsyncSlice, |
| { |
| categoryParts: ['disabled-by-default-gpu.device', |
| 'disabled-by-default-gpu.service'] |
| }); |
| |
| return { |
| GpuAsyncSlice: GpuAsyncSlice |
| }; |
| }); |
| </script> |