blob: 5dffdb4a4326ccd4b8d1e04d9c8f2bf411e7012b (
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
|
// Copyright (c) 2013 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.
'use strict';
base.require('cc.tile');
base.require('tracing.analysis.generic_object_view');
base.require('tracing.analysis.object_snapshot_view');
base.require('tracing.analysis.util');
base.exportTo('cc', function() {
/*
* Displays a tile in a human readable form.
* @constructor
*/
var TileSnapshotView = ui.define(
'tile-snapshot-view',
tracing.analysis.ObjectSnapshotView);
TileSnapshotView.prototype = {
__proto__: tracing.analysis.ObjectSnapshotView.prototype,
decorate: function() {
this.classList.add('tile-snapshot-view');
this.layerTreeView_ = new cc.LayerTreeHostImplSnapshotView();
this.appendChild(this.layerTreeView_);
},
updateContents: function() {
var tile = this.objectSnapshot_;
var layerTreeHostImpl = tile.containingSnapshot;
if (!layerTreeHostImpl)
return;
this.layerTreeView_.objectSnapshot = layerTreeHostImpl;
this.layerTreeView_.selection = new cc.TileSelection(tile);
}
};
tracing.analysis.ObjectSnapshotView.register(
'cc::Tile', TileSnapshotView, {
showInTrackView: false
});
return {
TileSnapshotView: TileSnapshotView
};
});
|