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.requireStylesheet('cc.picture_view');
9 tvcm.require('cc.picture');
10 tvcm.require('cc.picture_debugger');
11 tvcm.require('tracing.analysis.generic_object_view');
12 tvcm.require('tracing.analysis.object_snapshot_view');
13 tvcm.require('tracing.analysis.util');
15 tvcm.exportTo('cc', function() {
18 * Displays a picture snapshot in a human readable form.
21 var PictureSnapshotView = tvcm.ui.define(
22 'picture-snapshot-view',
23 tracing.analysis.ObjectSnapshotView);
25 PictureSnapshotView.prototype = {
26 __proto__: tracing.analysis.ObjectSnapshotView.prototype,
28 decorate: function() {
29 this.classList.add('picture-snapshot-view');
30 this.pictureDebugger_ = new cc.PictureDebugger();
31 this.appendChild(this.pictureDebugger_);
34 updateContents: function() {
35 if (this.objectSnapshot_ && this.pictureDebugger_)
36 this.pictureDebugger_.picture = this.objectSnapshot_;
40 tracing.analysis.ObjectSnapshotView.register(
41 'cc::Picture', PictureSnapshotView);
42 tracing.analysis.ObjectSnapshotView.register(
43 'cc::LayeredPicture', PictureSnapshotView);
46 PictureSnapshotView: PictureSnapshotView