summaryrefslogtreecommitdiff
path: root/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list.html
blob: f679b56c5908f09c2a83101106e5a7d6f6eb2ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!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="/tracing/extras/chrome/cc/picture.html">
<link rel="import" href="/tracing/model/object_instance.html">

<script>
'use strict';

tr.exportTo('tr.e.cc', function() {
  var ObjectSnapshot = tr.model.ObjectSnapshot;

  function DisplayItemList(skp64, layerRect) {
    tr.e.cc.Picture.apply(this, arguments);
  }

  DisplayItemList.prototype = {
    __proto__: tr.e.cc.Picture.prototype
  };

  /**
   * @constructor
   */
  function DisplayItemListSnapshot() {
    tr.e.cc.PictureSnapshot.apply(this, arguments);
  }

  DisplayItemListSnapshot.prototype = {
    __proto__: tr.e.cc.PictureSnapshot.prototype,

    initialize: function() {
      tr.e.cc.PictureSnapshot.prototype.initialize.call(this);
      this.displayItems_ = this.args.params.items;
    },

    get items() {
      return this.displayItems_;
    }
  };

  ObjectSnapshot.register(
      DisplayItemListSnapshot,
      {typeNames: ['cc::DisplayItemList']});

  return {
    DisplayItemListSnapshot: DisplayItemListSnapshot,
    DisplayItemList: DisplayItemList
  };
});
</script>