1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 tvcm.require('cc.tile');
8 tvcm.require('tracing.analysis.generic_object_view');
9 tvcm.require('tracing.analysis.object_snapshot_view');
10 tvcm.require('tracing.analysis.util');
12 tvcm.exportTo('cc', function() {
15 * Displays a tile in a human readable form.
18 var TileSnapshotView = tvcm.ui.define(
20 tracing.analysis.ObjectSnapshotView);
22 TileSnapshotView.prototype = {
23 __proto__: tracing.analysis.ObjectSnapshotView.prototype,
25 decorate: function() {
26 this.classList.add('tile-snapshot-view');
27 this.layerTreeView_ = new cc.LayerTreeHostImplSnapshotView();
28 this.appendChild(this.layerTreeView_);
31 updateContents: function() {
32 var tile = this.objectSnapshot_;
33 var layerTreeHostImpl = tile.containingSnapshot;
34 if (!layerTreeHostImpl)
37 this.layerTreeView_.objectSnapshot = layerTreeHostImpl;
38 this.layerTreeView_.selection = new cc.TileSelection(tile);
42 tracing.analysis.ObjectSnapshotView.register(
43 'cc::Tile', TileSnapshotView, {
44 showInTrackView: false
48 TileSnapshotView: TileSnapshotView