blob: 46fd92c36b69485ce6f5899243692942d416adb6 [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/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="/core/analysis/util.html">
<script>
'use strict';
tv.exportTo('tv.e.cc', function() {
/*
* Displays a tile in a human readable form.
* @constructor
*/
var TileSnapshotView = tv.b.ui.define(
'tile-snapshot-view',
tv.c.analysis.ObjectSnapshotView);
TileSnapshotView.prototype = {
__proto__: tv.c.analysis.ObjectSnapshotView.prototype,
decorate: function() {
this.classList.add('tile-snapshot-view');
this.layerTreeView_ = new tv.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 tv.e.cc.TileSelection(tile);
}
};
tv.c.analysis.ObjectSnapshotView.register(
TileSnapshotView,
{
typeName: 'cc::Tile',
showInTrackView: false
});
return {
TileSnapshotView: TileSnapshotView
};
});
</script>