blob: 1c1a79d44e263cddd6d37f64b41a90aa225e336a [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="/base/base.html">
<link rel="import" href="/model/object_instance.html">
<script>
'use strict';
tr.exportTo('tr.e.gpu', function() {
var ObjectSnapshot = tr.model.ObjectSnapshot;
/**
* @constructor
*/
function StateSnapshot() {
ObjectSnapshot.apply(this, arguments);
}
StateSnapshot.prototype = {
__proto__: ObjectSnapshot.prototype,
preInitialize: function() {
this.screenshot_ = undefined;
},
initialize: function() {
if (this.args.screenshot)
this.screenshot_ = this.args.screenshot;
},
/**
* @return {String} a base64 encoded screenshot if available.
*/
get screenshot() {
return this.screenshot_;
}
};
ObjectSnapshot.register(
StateSnapshot,
{typeName: 'gpu::State'});
return {
StateSnapshot: StateSnapshot
};
});
</script>