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