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 base.require('tracing.trace_model.object_instance');
9 base.exportTo('gpu', function() {
11 var ObjectSnapshot = tracing.trace_model.ObjectSnapshot;
16 function StateSnapshot() {
17 ObjectSnapshot.apply(this, arguments);
20 StateSnapshot.prototype = {
21 __proto__: ObjectSnapshot.prototype,
23 preInitialize: function() {
24 this.screenshot_ = undefined;
27 initialize: function() {
28 if (this.args.screenshot)
29 this.screenshot_ = this.args.screenshot;
33 * @return {String} a base64 encoded screenshot if available.
36 return this.screenshot_;
40 ObjectSnapshot.register('gpu::State', StateSnapshot);
43 StateSnapshot: StateSnapshot