blob: 4cd13f6f59da89d7e9d7d42e5b3711ffe9f9a677 [file] [log] [blame]
<!DOCTYPE html>
<!--
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.
-->
<link rel="import" href="/extras/chrome/cc/tile.html">
<link rel="import" href="/core/analysis/generic_object_view.html">
<link rel="import" href="/core/analysis/object_snapshot_view.html">
<link rel="import" href="/base/units/util.html">
<script>
'use strict';
tr.exportTo('tr.e.cc', function() {
/*
* Displays a tile in a human readable form.
* @constructor
*/
var TileSnapshotView = tr.b.ui.define(
'tile-snapshot-view',
tr.c.analysis.ObjectSnapshotView);
TileSnapshotView.prototype = {
__proto__: tr.c.analysis.ObjectSnapshotView.prototype,
decorate: function() {
this.classList.add('tile-snapshot-view');
this.layerTreeView_ = new tr.e.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 tr.e.cc.TileSelection(tile);
}
};
tr.c.analysis.ObjectSnapshotView.register(
TileSnapshotView,
{
typeName: 'cc::Tile',
showInTrackView: false
});
return {
TileSnapshotView: TileSnapshotView
};
});
</script>