| Index: mojo/dart/packages/mojo_services/lib/mojo/command_buffer.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/mojo/command_buffer.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/command_buffer.mojom.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f35bc1290dd83f72b260f84895cda05e68678603
|
| --- /dev/null
|
| +++ b/mojo/dart/packages/mojo_services/lib/mojo/command_buffer.mojom.dart
|
| @@ -0,0 +1,2002 @@
|
| +// Copyright 2014 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.
|
| +
|
| +library command_buffer_mojom;
|
| +
|
| +import 'dart:async';
|
| +
|
| +import 'package:mojo/bindings.dart' as bindings;
|
| +import 'package:mojo/core.dart' as core;
|
| +import 'package:mojo_services/mojo/gpu_capabilities.mojom.dart' as gpu_capabilities_mojom;
|
| +
|
| +
|
| +
|
| +class CommandBufferState extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(40, 0)
|
| + ];
|
| + int numEntries = 0;
|
| + int getOffset = 0;
|
| + int putOffset = 0;
|
| + int token = 0;
|
| + int error = 0;
|
| + int contextLostReason = 0;
|
| + int generation = 0;
|
| +
|
| + CommandBufferState() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferState deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferState decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferState result = new CommandBufferState();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.numEntries = decoder0.decodeInt32(8);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.getOffset = decoder0.decodeInt32(12);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.putOffset = decoder0.decodeInt32(16);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.token = decoder0.decodeInt32(20);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.error = decoder0.decodeInt32(24);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.contextLostReason = decoder0.decodeInt32(28);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.generation = decoder0.decodeUint32(32);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(numEntries, 8);
|
| +
|
| + encoder0.encodeInt32(getOffset, 12);
|
| +
|
| + encoder0.encodeInt32(putOffset, 16);
|
| +
|
| + encoder0.encodeInt32(token, 20);
|
| +
|
| + encoder0.encodeInt32(error, 24);
|
| +
|
| + encoder0.encodeInt32(contextLostReason, 28);
|
| +
|
| + encoder0.encodeUint32(generation, 32);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferState("
|
| + "numEntries: $numEntries" ", "
|
| + "getOffset: $getOffset" ", "
|
| + "putOffset: $putOffset" ", "
|
| + "token: $token" ", "
|
| + "error: $error" ", "
|
| + "contextLostReason: $contextLostReason" ", "
|
| + "generation: $generation" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["numEntries"] = numEntries;
|
| + map["getOffset"] = getOffset;
|
| + map["putOffset"] = putOffset;
|
| + map["token"] = token;
|
| + map["error"] = error;
|
| + map["contextLostReason"] = contextLostReason;
|
| + map["generation"] = generation;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncClientDidInitializeParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(24, 0)
|
| + ];
|
| + bool success = false;
|
| + gpu_capabilities_mojom.GpuCapabilities capabilities = null;
|
| +
|
| + CommandBufferSyncClientDidInitializeParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferSyncClientDidInitializeParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferSyncClientDidInitializeParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferSyncClientDidInitializeParams result = new CommandBufferSyncClientDidInitializeParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.success = decoder0.decodeBool(8, 0);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(16, false);
|
| + result.capabilities = gpu_capabilities_mojom.GpuCapabilities.decode(decoder1);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeBool(success, 8, 0);
|
| +
|
| + encoder0.encodeStruct(capabilities, 16, false);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferSyncClientDidInitializeParams("
|
| + "success: $success" ", "
|
| + "capabilities: $capabilities" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["success"] = success;
|
| + map["capabilities"] = capabilities;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncClientDidMakeProgressParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + CommandBufferState state = null;
|
| +
|
| + CommandBufferSyncClientDidMakeProgressParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferSyncClientDidMakeProgressParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferSyncClientDidMakeProgressParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferSyncClientDidMakeProgressParams result = new CommandBufferSyncClientDidMakeProgressParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + var decoder1 = decoder0.decodePointer(8, false);
|
| + result.state = CommandBufferState.decode(decoder1);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeStruct(state, 8, false);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferSyncClientDidMakeProgressParams("
|
| + "state: $state" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["state"] = state;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncPointClientDidInsertSyncPointParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int syncPoint = 0;
|
| +
|
| + CommandBufferSyncPointClientDidInsertSyncPointParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferSyncPointClientDidInsertSyncPointParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferSyncPointClientDidInsertSyncPointParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferSyncPointClientDidInsertSyncPointParams result = new CommandBufferSyncPointClientDidInsertSyncPointParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.syncPoint = decoder0.decodeUint32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeUint32(syncPoint, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferSyncPointClientDidInsertSyncPointParams("
|
| + "syncPoint: $syncPoint" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["syncPoint"] = syncPoint;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferLostContextObserverDidLoseContextParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int contextLostReason = 0;
|
| +
|
| + CommandBufferLostContextObserverDidLoseContextParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferLostContextObserverDidLoseContextParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferLostContextObserverDidLoseContextParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferLostContextObserverDidLoseContextParams result = new CommandBufferLostContextObserverDidLoseContextParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.contextLostReason = decoder0.decodeInt32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(contextLostReason, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferLostContextObserverDidLoseContextParams("
|
| + "contextLostReason: $contextLostReason" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["contextLostReason"] = contextLostReason;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferInitializeParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(40, 0)
|
| + ];
|
| + Object syncClient = null;
|
| + Object syncPointClient = null;
|
| + Object lostObserver = null;
|
| + core.MojoSharedBuffer sharedState = null;
|
| +
|
| + CommandBufferInitializeParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferInitializeParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferInitializeParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferInitializeParams result = new CommandBufferInitializeParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.syncClient = decoder0.decodeServiceInterface(8, false, CommandBufferSyncClientProxy.newFromEndpoint);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.syncPointClient = decoder0.decodeServiceInterface(16, false, CommandBufferSyncPointClientProxy.newFromEndpoint);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.lostObserver = decoder0.decodeServiceInterface(24, false, CommandBufferLostContextObserverProxy.newFromEndpoint);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.sharedState = decoder0.decodeSharedBufferHandle(32, false);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInterface(syncClient, 8, false);
|
| +
|
| + encoder0.encodeInterface(syncPointClient, 16, false);
|
| +
|
| + encoder0.encodeInterface(lostObserver, 24, false);
|
| +
|
| + encoder0.encodeSharedBufferHandle(sharedState, 32, false);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferInitializeParams("
|
| + "syncClient: $syncClient" ", "
|
| + "syncPointClient: $syncPointClient" ", "
|
| + "lostObserver: $lostObserver" ", "
|
| + "sharedState: $sharedState" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + throw new bindings.MojoCodecError(
|
| + 'Object containing handles cannot be encoded to JSON.');
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferSetGetBufferParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int buffer = 0;
|
| +
|
| + CommandBufferSetGetBufferParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferSetGetBufferParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferSetGetBufferParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferSetGetBufferParams result = new CommandBufferSetGetBufferParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.buffer = decoder0.decodeInt32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(buffer, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferSetGetBufferParams("
|
| + "buffer: $buffer" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["buffer"] = buffer;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferFlushParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int putOffset = 0;
|
| +
|
| + CommandBufferFlushParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferFlushParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferFlushParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferFlushParams result = new CommandBufferFlushParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.putOffset = decoder0.decodeInt32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(putOffset, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferFlushParams("
|
| + "putOffset: $putOffset" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["putOffset"] = putOffset;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferMakeProgressParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int lastGetOffset = 0;
|
| +
|
| + CommandBufferMakeProgressParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferMakeProgressParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferMakeProgressParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferMakeProgressParams result = new CommandBufferMakeProgressParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.lastGetOffset = decoder0.decodeInt32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(lastGetOffset, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferMakeProgressParams("
|
| + "lastGetOffset: $lastGetOffset" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["lastGetOffset"] = lastGetOffset;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferRegisterTransferBufferParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(24, 0)
|
| + ];
|
| + int id = 0;
|
| + core.MojoSharedBuffer transferBuffer = null;
|
| + int size = 0;
|
| +
|
| + CommandBufferRegisterTransferBufferParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferRegisterTransferBufferParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferRegisterTransferBufferParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferRegisterTransferBufferParams result = new CommandBufferRegisterTransferBufferParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.id = decoder0.decodeInt32(8);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.transferBuffer = decoder0.decodeSharedBufferHandle(12, false);
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.size = decoder0.decodeUint32(16);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(id, 8);
|
| +
|
| + encoder0.encodeSharedBufferHandle(transferBuffer, 12, false);
|
| +
|
| + encoder0.encodeUint32(size, 16);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferRegisterTransferBufferParams("
|
| + "id: $id" ", "
|
| + "transferBuffer: $transferBuffer" ", "
|
| + "size: $size" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + throw new bindings.MojoCodecError(
|
| + 'Object containing handles cannot be encoded to JSON.');
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferDestroyTransferBufferParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int id = 0;
|
| +
|
| + CommandBufferDestroyTransferBufferParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferDestroyTransferBufferParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferDestroyTransferBufferParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferDestroyTransferBufferParams result = new CommandBufferDestroyTransferBufferParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.id = decoder0.decodeInt32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeInt32(id, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferDestroyTransferBufferParams("
|
| + "id: $id" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["id"] = id;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferInsertSyncPointParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + bool retire = false;
|
| +
|
| + CommandBufferInsertSyncPointParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferInsertSyncPointParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferInsertSyncPointParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferInsertSyncPointParams result = new CommandBufferInsertSyncPointParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.retire = decoder0.decodeBool(8, 0);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeBool(retire, 8, 0);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferInsertSyncPointParams("
|
| + "retire: $retire" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["retire"] = retire;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferRetireSyncPointParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(16, 0)
|
| + ];
|
| + int syncPoint = 0;
|
| +
|
| + CommandBufferRetireSyncPointParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferRetireSyncPointParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferRetireSyncPointParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferRetireSyncPointParams result = new CommandBufferRetireSyncPointParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + if (mainDataHeader.version >= 0) {
|
| +
|
| + result.syncPoint = decoder0.decodeUint32(8);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
|
| +
|
| + encoder0.encodeUint32(syncPoint, 8);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferRetireSyncPointParams("
|
| + "syncPoint: $syncPoint" ")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + map["syncPoint"] = syncPoint;
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferEchoParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(8, 0)
|
| + ];
|
| +
|
| + CommandBufferEchoParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferEchoParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferEchoParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferEchoParams result = new CommandBufferEchoParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + encoder.getStructEncoderAtOffset(kVersions.last);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferEchoParams("")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferEchoResponseParams extends bindings.Struct {
|
| + static const List<bindings.StructDataHeader> kVersions = const [
|
| + const bindings.StructDataHeader(8, 0)
|
| + ];
|
| +
|
| + CommandBufferEchoResponseParams() : super(kVersions.last.size);
|
| +
|
| + static CommandBufferEchoResponseParams deserialize(bindings.Message message) {
|
| + var decoder = new bindings.Decoder(message);
|
| + var result = decode(decoder);
|
| + if (decoder.excessHandles != null) {
|
| + decoder.excessHandles.forEach((h) => h.close());
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static CommandBufferEchoResponseParams decode(bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + CommandBufferEchoResponseParams result = new CommandBufferEchoResponseParams();
|
| +
|
| + var mainDataHeader = decoder0.decodeStructDataHeader();
|
| + if (mainDataHeader.version <= kVersions.last.version) {
|
| + // Scan in reverse order to optimize for more recent versions.
|
| + for (int i = kVersions.length - 1; i >= 0; --i) {
|
| + if (mainDataHeader.version >= kVersions[i].version) {
|
| + if (mainDataHeader.size == kVersions[i].size) {
|
| + // Found a match.
|
| + break;
|
| + }
|
| + throw new bindings.MojoCodecError(
|
| + 'Header size doesn\'t correspond to known version size.');
|
| + }
|
| + }
|
| + } else if (mainDataHeader.size < kVersions.last.size) {
|
| + throw new bindings.MojoCodecError(
|
| + 'Message newer than the last known version cannot be shorter than '
|
| + 'required by the last known version.');
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + void encode(bindings.Encoder encoder) {
|
| + encoder.getStructEncoderAtOffset(kVersions.last);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferEchoResponseParams("")";
|
| + }
|
| +
|
| + Map toJson() {
|
| + Map map = new Map();
|
| + return map;
|
| + }
|
| +}
|
| +
|
| +const int kCommandBufferSyncClient_didInitialize_name = 0;
|
| +const int kCommandBufferSyncClient_didMakeProgress_name = 1;
|
| +
|
| +const String CommandBufferSyncClientName =
|
| + 'mojo::CommandBufferSyncClient';
|
| +
|
| +abstract class CommandBufferSyncClient {
|
| + void didInitialize(bool success, gpu_capabilities_mojom.GpuCapabilities capabilities);
|
| + void didMakeProgress(CommandBufferState state);
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncClientProxyImpl extends bindings.Proxy {
|
| + CommandBufferSyncClientProxyImpl.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferSyncClientProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + super.fromHandle(handle);
|
| +
|
| + CommandBufferSyncClientProxyImpl.unbound() : super.unbound();
|
| +
|
| + static CommandBufferSyncClientProxyImpl newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferSyncClientProxyImpl"));
|
| + return new CommandBufferSyncClientProxyImpl.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + String get name => CommandBufferSyncClientName;
|
| +
|
| + void handleResponse(bindings.ServiceMessage message) {
|
| + switch (message.header.type) {
|
| + default:
|
| + proxyError("Unexpected message type: ${message.header.type}");
|
| + close(immediate: true);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferSyncClientProxyImpl($superString)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class _CommandBufferSyncClientProxyCalls implements CommandBufferSyncClient {
|
| + CommandBufferSyncClientProxyImpl _proxyImpl;
|
| +
|
| + _CommandBufferSyncClientProxyCalls(this._proxyImpl);
|
| + void didInitialize(bool success, gpu_capabilities_mojom.GpuCapabilities capabilities) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferSyncClientDidInitializeParams();
|
| + params.success = success;
|
| + params.capabilities = capabilities;
|
| + _proxyImpl.sendMessage(params, kCommandBufferSyncClient_didInitialize_name);
|
| + }
|
| +
|
| + void didMakeProgress(CommandBufferState state) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferSyncClientDidMakeProgressParams();
|
| + params.state = state;
|
| + _proxyImpl.sendMessage(params, kCommandBufferSyncClient_didMakeProgress_name);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncClientProxy implements bindings.ProxyBase {
|
| + final bindings.Proxy impl;
|
| + CommandBufferSyncClient ptr;
|
| + final String name = CommandBufferSyncClientName;
|
| +
|
| + CommandBufferSyncClientProxy(CommandBufferSyncClientProxyImpl proxyImpl) :
|
| + impl = proxyImpl,
|
| + ptr = new _CommandBufferSyncClientProxyCalls(proxyImpl);
|
| +
|
| + CommandBufferSyncClientProxy.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) :
|
| + impl = new CommandBufferSyncClientProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _CommandBufferSyncClientProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferSyncClientProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new CommandBufferSyncClientProxyImpl.fromHandle(handle) {
|
| + ptr = new _CommandBufferSyncClientProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferSyncClientProxy.unbound() :
|
| + impl = new CommandBufferSyncClientProxyImpl.unbound() {
|
| + ptr = new _CommandBufferSyncClientProxyCalls(impl);
|
| + }
|
| +
|
| + factory CommandBufferSyncClientProxy.connectToService(
|
| + bindings.ServiceConnector s, String url) {
|
| + CommandBufferSyncClientProxy p = new CommandBufferSyncClientProxy.unbound();
|
| + s.connectToService(url, p);
|
| + return p;
|
| + }
|
| +
|
| + static CommandBufferSyncClientProxy newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferSyncClientProxy"));
|
| + return new CommandBufferSyncClientProxy.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| +
|
| + Future responseOrError(Future f) => impl.responseOrError(f);
|
| +
|
| + Future get errorFuture => impl.errorFuture;
|
| +
|
| + int get version => impl.version;
|
| +
|
| + Future<int> queryVersion() => impl.queryVersion();
|
| +
|
| + void requireVersion(int requiredVersion) {
|
| + impl.requireVersion(requiredVersion);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferSyncClientProxy($impl)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncClientStub extends bindings.Stub {
|
| + CommandBufferSyncClient _impl = null;
|
| +
|
| + CommandBufferSyncClientStub.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| + : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferSyncClientStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + : super.fromHandle(handle);
|
| +
|
| + CommandBufferSyncClientStub.unbound() : super.unbound();
|
| +
|
| + static CommandBufferSyncClientStub newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferSyncClientStub"));
|
| + return new CommandBufferSyncClientStub.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + static const String name = CommandBufferSyncClientName;
|
| +
|
| +
|
| +
|
| + dynamic handleMessage(bindings.ServiceMessage message) {
|
| + if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| + return bindings.ControlMessageHandler.handleMessage(this,
|
| + 0,
|
| + message);
|
| + }
|
| + assert(_impl != null);
|
| + switch (message.header.type) {
|
| + case kCommandBufferSyncClient_didInitialize_name:
|
| + var params = CommandBufferSyncClientDidInitializeParams.deserialize(
|
| + message.payload);
|
| + _impl.didInitialize(params.success, params.capabilities);
|
| + break;
|
| + case kCommandBufferSyncClient_didMakeProgress_name:
|
| + var params = CommandBufferSyncClientDidMakeProgressParams.deserialize(
|
| + message.payload);
|
| + _impl.didMakeProgress(params.state);
|
| + break;
|
| + default:
|
| + throw new bindings.MojoCodecError("Unexpected message name");
|
| + break;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + CommandBufferSyncClient get impl => _impl;
|
| + set impl(CommandBufferSyncClient d) {
|
| + assert(_impl == null);
|
| + _impl = d;
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferSyncClientStub($superString)";
|
| + }
|
| +
|
| + int get version => 0;
|
| +}
|
| +
|
| +const int kCommandBufferSyncPointClient_didInsertSyncPoint_name = 0;
|
| +
|
| +const String CommandBufferSyncPointClientName =
|
| + 'mojo::CommandBufferSyncPointClient';
|
| +
|
| +abstract class CommandBufferSyncPointClient {
|
| + void didInsertSyncPoint(int syncPoint);
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncPointClientProxyImpl extends bindings.Proxy {
|
| + CommandBufferSyncPointClientProxyImpl.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferSyncPointClientProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + super.fromHandle(handle);
|
| +
|
| + CommandBufferSyncPointClientProxyImpl.unbound() : super.unbound();
|
| +
|
| + static CommandBufferSyncPointClientProxyImpl newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferSyncPointClientProxyImpl"));
|
| + return new CommandBufferSyncPointClientProxyImpl.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + String get name => CommandBufferSyncPointClientName;
|
| +
|
| + void handleResponse(bindings.ServiceMessage message) {
|
| + switch (message.header.type) {
|
| + default:
|
| + proxyError("Unexpected message type: ${message.header.type}");
|
| + close(immediate: true);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferSyncPointClientProxyImpl($superString)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class _CommandBufferSyncPointClientProxyCalls implements CommandBufferSyncPointClient {
|
| + CommandBufferSyncPointClientProxyImpl _proxyImpl;
|
| +
|
| + _CommandBufferSyncPointClientProxyCalls(this._proxyImpl);
|
| + void didInsertSyncPoint(int syncPoint) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferSyncPointClientDidInsertSyncPointParams();
|
| + params.syncPoint = syncPoint;
|
| + _proxyImpl.sendMessage(params, kCommandBufferSyncPointClient_didInsertSyncPoint_name);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncPointClientProxy implements bindings.ProxyBase {
|
| + final bindings.Proxy impl;
|
| + CommandBufferSyncPointClient ptr;
|
| + final String name = CommandBufferSyncPointClientName;
|
| +
|
| + CommandBufferSyncPointClientProxy(CommandBufferSyncPointClientProxyImpl proxyImpl) :
|
| + impl = proxyImpl,
|
| + ptr = new _CommandBufferSyncPointClientProxyCalls(proxyImpl);
|
| +
|
| + CommandBufferSyncPointClientProxy.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) :
|
| + impl = new CommandBufferSyncPointClientProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _CommandBufferSyncPointClientProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferSyncPointClientProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new CommandBufferSyncPointClientProxyImpl.fromHandle(handle) {
|
| + ptr = new _CommandBufferSyncPointClientProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferSyncPointClientProxy.unbound() :
|
| + impl = new CommandBufferSyncPointClientProxyImpl.unbound() {
|
| + ptr = new _CommandBufferSyncPointClientProxyCalls(impl);
|
| + }
|
| +
|
| + factory CommandBufferSyncPointClientProxy.connectToService(
|
| + bindings.ServiceConnector s, String url) {
|
| + CommandBufferSyncPointClientProxy p = new CommandBufferSyncPointClientProxy.unbound();
|
| + s.connectToService(url, p);
|
| + return p;
|
| + }
|
| +
|
| + static CommandBufferSyncPointClientProxy newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferSyncPointClientProxy"));
|
| + return new CommandBufferSyncPointClientProxy.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| +
|
| + Future responseOrError(Future f) => impl.responseOrError(f);
|
| +
|
| + Future get errorFuture => impl.errorFuture;
|
| +
|
| + int get version => impl.version;
|
| +
|
| + Future<int> queryVersion() => impl.queryVersion();
|
| +
|
| + void requireVersion(int requiredVersion) {
|
| + impl.requireVersion(requiredVersion);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferSyncPointClientProxy($impl)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferSyncPointClientStub extends bindings.Stub {
|
| + CommandBufferSyncPointClient _impl = null;
|
| +
|
| + CommandBufferSyncPointClientStub.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| + : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferSyncPointClientStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + : super.fromHandle(handle);
|
| +
|
| + CommandBufferSyncPointClientStub.unbound() : super.unbound();
|
| +
|
| + static CommandBufferSyncPointClientStub newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferSyncPointClientStub"));
|
| + return new CommandBufferSyncPointClientStub.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + static const String name = CommandBufferSyncPointClientName;
|
| +
|
| +
|
| +
|
| + dynamic handleMessage(bindings.ServiceMessage message) {
|
| + if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| + return bindings.ControlMessageHandler.handleMessage(this,
|
| + 0,
|
| + message);
|
| + }
|
| + assert(_impl != null);
|
| + switch (message.header.type) {
|
| + case kCommandBufferSyncPointClient_didInsertSyncPoint_name:
|
| + var params = CommandBufferSyncPointClientDidInsertSyncPointParams.deserialize(
|
| + message.payload);
|
| + _impl.didInsertSyncPoint(params.syncPoint);
|
| + break;
|
| + default:
|
| + throw new bindings.MojoCodecError("Unexpected message name");
|
| + break;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + CommandBufferSyncPointClient get impl => _impl;
|
| + set impl(CommandBufferSyncPointClient d) {
|
| + assert(_impl == null);
|
| + _impl = d;
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferSyncPointClientStub($superString)";
|
| + }
|
| +
|
| + int get version => 0;
|
| +}
|
| +
|
| +const int kCommandBufferLostContextObserver_didLoseContext_name = 0;
|
| +
|
| +const String CommandBufferLostContextObserverName =
|
| + 'mojo::CommandBufferLostContextObserver';
|
| +
|
| +abstract class CommandBufferLostContextObserver {
|
| + void didLoseContext(int contextLostReason);
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferLostContextObserverProxyImpl extends bindings.Proxy {
|
| + CommandBufferLostContextObserverProxyImpl.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferLostContextObserverProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + super.fromHandle(handle);
|
| +
|
| + CommandBufferLostContextObserverProxyImpl.unbound() : super.unbound();
|
| +
|
| + static CommandBufferLostContextObserverProxyImpl newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferLostContextObserverProxyImpl"));
|
| + return new CommandBufferLostContextObserverProxyImpl.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + String get name => CommandBufferLostContextObserverName;
|
| +
|
| + void handleResponse(bindings.ServiceMessage message) {
|
| + switch (message.header.type) {
|
| + default:
|
| + proxyError("Unexpected message type: ${message.header.type}");
|
| + close(immediate: true);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferLostContextObserverProxyImpl($superString)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class _CommandBufferLostContextObserverProxyCalls implements CommandBufferLostContextObserver {
|
| + CommandBufferLostContextObserverProxyImpl _proxyImpl;
|
| +
|
| + _CommandBufferLostContextObserverProxyCalls(this._proxyImpl);
|
| + void didLoseContext(int contextLostReason) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferLostContextObserverDidLoseContextParams();
|
| + params.contextLostReason = contextLostReason;
|
| + _proxyImpl.sendMessage(params, kCommandBufferLostContextObserver_didLoseContext_name);
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferLostContextObserverProxy implements bindings.ProxyBase {
|
| + final bindings.Proxy impl;
|
| + CommandBufferLostContextObserver ptr;
|
| + final String name = CommandBufferLostContextObserverName;
|
| +
|
| + CommandBufferLostContextObserverProxy(CommandBufferLostContextObserverProxyImpl proxyImpl) :
|
| + impl = proxyImpl,
|
| + ptr = new _CommandBufferLostContextObserverProxyCalls(proxyImpl);
|
| +
|
| + CommandBufferLostContextObserverProxy.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) :
|
| + impl = new CommandBufferLostContextObserverProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _CommandBufferLostContextObserverProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferLostContextObserverProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new CommandBufferLostContextObserverProxyImpl.fromHandle(handle) {
|
| + ptr = new _CommandBufferLostContextObserverProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferLostContextObserverProxy.unbound() :
|
| + impl = new CommandBufferLostContextObserverProxyImpl.unbound() {
|
| + ptr = new _CommandBufferLostContextObserverProxyCalls(impl);
|
| + }
|
| +
|
| + factory CommandBufferLostContextObserverProxy.connectToService(
|
| + bindings.ServiceConnector s, String url) {
|
| + CommandBufferLostContextObserverProxy p = new CommandBufferLostContextObserverProxy.unbound();
|
| + s.connectToService(url, p);
|
| + return p;
|
| + }
|
| +
|
| + static CommandBufferLostContextObserverProxy newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferLostContextObserverProxy"));
|
| + return new CommandBufferLostContextObserverProxy.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| +
|
| + Future responseOrError(Future f) => impl.responseOrError(f);
|
| +
|
| + Future get errorFuture => impl.errorFuture;
|
| +
|
| + int get version => impl.version;
|
| +
|
| + Future<int> queryVersion() => impl.queryVersion();
|
| +
|
| + void requireVersion(int requiredVersion) {
|
| + impl.requireVersion(requiredVersion);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferLostContextObserverProxy($impl)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferLostContextObserverStub extends bindings.Stub {
|
| + CommandBufferLostContextObserver _impl = null;
|
| +
|
| + CommandBufferLostContextObserverStub.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| + : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferLostContextObserverStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + : super.fromHandle(handle);
|
| +
|
| + CommandBufferLostContextObserverStub.unbound() : super.unbound();
|
| +
|
| + static CommandBufferLostContextObserverStub newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferLostContextObserverStub"));
|
| + return new CommandBufferLostContextObserverStub.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + static const String name = CommandBufferLostContextObserverName;
|
| +
|
| +
|
| +
|
| + dynamic handleMessage(bindings.ServiceMessage message) {
|
| + if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| + return bindings.ControlMessageHandler.handleMessage(this,
|
| + 0,
|
| + message);
|
| + }
|
| + assert(_impl != null);
|
| + switch (message.header.type) {
|
| + case kCommandBufferLostContextObserver_didLoseContext_name:
|
| + var params = CommandBufferLostContextObserverDidLoseContextParams.deserialize(
|
| + message.payload);
|
| + _impl.didLoseContext(params.contextLostReason);
|
| + break;
|
| + default:
|
| + throw new bindings.MojoCodecError("Unexpected message name");
|
| + break;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + CommandBufferLostContextObserver get impl => _impl;
|
| + set impl(CommandBufferLostContextObserver d) {
|
| + assert(_impl == null);
|
| + _impl = d;
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferLostContextObserverStub($superString)";
|
| + }
|
| +
|
| + int get version => 0;
|
| +}
|
| +
|
| +const int kCommandBuffer_initialize_name = 0;
|
| +const int kCommandBuffer_setGetBuffer_name = 1;
|
| +const int kCommandBuffer_flush_name = 2;
|
| +const int kCommandBuffer_makeProgress_name = 3;
|
| +const int kCommandBuffer_registerTransferBuffer_name = 4;
|
| +const int kCommandBuffer_destroyTransferBuffer_name = 5;
|
| +const int kCommandBuffer_insertSyncPoint_name = 6;
|
| +const int kCommandBuffer_retireSyncPoint_name = 7;
|
| +const int kCommandBuffer_echo_name = 8;
|
| +
|
| +const String CommandBufferName =
|
| + 'mojo::CommandBuffer';
|
| +
|
| +abstract class CommandBuffer {
|
| + void initialize(Object syncClient, Object syncPointClient, Object lostObserver, core.MojoSharedBuffer sharedState);
|
| + void setGetBuffer(int buffer);
|
| + void flush(int putOffset);
|
| + void makeProgress(int lastGetOffset);
|
| + void registerTransferBuffer(int id, core.MojoSharedBuffer transferBuffer, int size);
|
| + void destroyTransferBuffer(int id);
|
| + void insertSyncPoint(bool retire);
|
| + void retireSyncPoint(int syncPoint);
|
| + dynamic echo([Function responseFactory = null]);
|
| +
|
| +}
|
| +
|
| +
|
| +class CommandBufferProxyImpl extends bindings.Proxy {
|
| + CommandBufferProxyImpl.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferProxyImpl.fromHandle(core.MojoHandle handle) :
|
| + super.fromHandle(handle);
|
| +
|
| + CommandBufferProxyImpl.unbound() : super.unbound();
|
| +
|
| + static CommandBufferProxyImpl newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferProxyImpl"));
|
| + return new CommandBufferProxyImpl.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + String get name => CommandBufferName;
|
| +
|
| + void handleResponse(bindings.ServiceMessage message) {
|
| + switch (message.header.type) {
|
| + case kCommandBuffer_echo_name:
|
| + var r = CommandBufferEchoResponseParams.deserialize(
|
| + message.payload);
|
| + if (!message.header.hasRequestId) {
|
| + proxyError("Expected a message with a valid request Id.");
|
| + return;
|
| + }
|
| + Completer c = completerMap[message.header.requestId];
|
| + if (c == null) {
|
| + proxyError(
|
| + "Message had unknown request Id: ${message.header.requestId}");
|
| + return;
|
| + }
|
| + completerMap.remove(message.header.requestId);
|
| + if (c.isCompleted) {
|
| + proxyError("Response completer already completed");
|
| + return;
|
| + }
|
| + c.complete(r);
|
| + break;
|
| + default:
|
| + proxyError("Unexpected message type: ${message.header.type}");
|
| + close(immediate: true);
|
| + break;
|
| + }
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferProxyImpl($superString)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class _CommandBufferProxyCalls implements CommandBuffer {
|
| + CommandBufferProxyImpl _proxyImpl;
|
| +
|
| + _CommandBufferProxyCalls(this._proxyImpl);
|
| + void initialize(Object syncClient, Object syncPointClient, Object lostObserver, core.MojoSharedBuffer sharedState) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferInitializeParams();
|
| + params.syncClient = syncClient;
|
| + params.syncPointClient = syncPointClient;
|
| + params.lostObserver = lostObserver;
|
| + params.sharedState = sharedState;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_initialize_name);
|
| + }
|
| +
|
| + void setGetBuffer(int buffer) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferSetGetBufferParams();
|
| + params.buffer = buffer;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_setGetBuffer_name);
|
| + }
|
| +
|
| + void flush(int putOffset) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferFlushParams();
|
| + params.putOffset = putOffset;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_flush_name);
|
| + }
|
| +
|
| + void makeProgress(int lastGetOffset) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferMakeProgressParams();
|
| + params.lastGetOffset = lastGetOffset;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_makeProgress_name);
|
| + }
|
| +
|
| + void registerTransferBuffer(int id, core.MojoSharedBuffer transferBuffer, int size) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferRegisterTransferBufferParams();
|
| + params.id = id;
|
| + params.transferBuffer = transferBuffer;
|
| + params.size = size;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_registerTransferBuffer_name);
|
| + }
|
| +
|
| + void destroyTransferBuffer(int id) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferDestroyTransferBufferParams();
|
| + params.id = id;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_destroyTransferBuffer_name);
|
| + }
|
| +
|
| + void insertSyncPoint(bool retire) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferInsertSyncPointParams();
|
| + params.retire = retire;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_insertSyncPoint_name);
|
| + }
|
| +
|
| + void retireSyncPoint(int syncPoint) {
|
| + if (!_proxyImpl.isBound) {
|
| + _proxyImpl.proxyError("The Proxy is closed.");
|
| + return;
|
| + }
|
| + var params = new CommandBufferRetireSyncPointParams();
|
| + params.syncPoint = syncPoint;
|
| + _proxyImpl.sendMessage(params, kCommandBuffer_retireSyncPoint_name);
|
| + }
|
| +
|
| + dynamic echo([Function responseFactory = null]) {
|
| + var params = new CommandBufferEchoParams();
|
| + return _proxyImpl.sendMessageWithRequestId(
|
| + params,
|
| + kCommandBuffer_echo_name,
|
| + -1,
|
| + bindings.MessageHeader.kMessageExpectsResponse);
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferProxy implements bindings.ProxyBase {
|
| + final bindings.Proxy impl;
|
| + CommandBuffer ptr;
|
| + final String name = CommandBufferName;
|
| +
|
| + CommandBufferProxy(CommandBufferProxyImpl proxyImpl) :
|
| + impl = proxyImpl,
|
| + ptr = new _CommandBufferProxyCalls(proxyImpl);
|
| +
|
| + CommandBufferProxy.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) :
|
| + impl = new CommandBufferProxyImpl.fromEndpoint(endpoint) {
|
| + ptr = new _CommandBufferProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferProxy.fromHandle(core.MojoHandle handle) :
|
| + impl = new CommandBufferProxyImpl.fromHandle(handle) {
|
| + ptr = new _CommandBufferProxyCalls(impl);
|
| + }
|
| +
|
| + CommandBufferProxy.unbound() :
|
| + impl = new CommandBufferProxyImpl.unbound() {
|
| + ptr = new _CommandBufferProxyCalls(impl);
|
| + }
|
| +
|
| + factory CommandBufferProxy.connectToService(
|
| + bindings.ServiceConnector s, String url) {
|
| + CommandBufferProxy p = new CommandBufferProxy.unbound();
|
| + s.connectToService(url, p);
|
| + return p;
|
| + }
|
| +
|
| + static CommandBufferProxy newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferProxy"));
|
| + return new CommandBufferProxy.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + Future close({bool immediate: false}) => impl.close(immediate: immediate);
|
| +
|
| + Future responseOrError(Future f) => impl.responseOrError(f);
|
| +
|
| + Future get errorFuture => impl.errorFuture;
|
| +
|
| + int get version => impl.version;
|
| +
|
| + Future<int> queryVersion() => impl.queryVersion();
|
| +
|
| + void requireVersion(int requiredVersion) {
|
| + impl.requireVersion(requiredVersion);
|
| + }
|
| +
|
| + String toString() {
|
| + return "CommandBufferProxy($impl)";
|
| + }
|
| +}
|
| +
|
| +
|
| +class CommandBufferStub extends bindings.Stub {
|
| + CommandBuffer _impl = null;
|
| +
|
| + CommandBufferStub.fromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint, [this._impl])
|
| + : super.fromEndpoint(endpoint);
|
| +
|
| + CommandBufferStub.fromHandle(core.MojoHandle handle, [this._impl])
|
| + : super.fromHandle(handle);
|
| +
|
| + CommandBufferStub.unbound() : super.unbound();
|
| +
|
| + static CommandBufferStub newFromEndpoint(
|
| + core.MojoMessagePipeEndpoint endpoint) {
|
| + assert(endpoint.setDescription("For CommandBufferStub"));
|
| + return new CommandBufferStub.fromEndpoint(endpoint);
|
| + }
|
| +
|
| + static const String name = CommandBufferName;
|
| +
|
| +
|
| + CommandBufferEchoResponseParams _CommandBufferEchoResponseParamsFactory() {
|
| + var result = new CommandBufferEchoResponseParams();
|
| + return result;
|
| + }
|
| +
|
| + dynamic handleMessage(bindings.ServiceMessage message) {
|
| + if (bindings.ControlMessageHandler.isControlMessage(message)) {
|
| + return bindings.ControlMessageHandler.handleMessage(this,
|
| + 0,
|
| + message);
|
| + }
|
| + assert(_impl != null);
|
| + switch (message.header.type) {
|
| + case kCommandBuffer_initialize_name:
|
| + var params = CommandBufferInitializeParams.deserialize(
|
| + message.payload);
|
| + _impl.initialize(params.syncClient, params.syncPointClient, params.lostObserver, params.sharedState);
|
| + break;
|
| + case kCommandBuffer_setGetBuffer_name:
|
| + var params = CommandBufferSetGetBufferParams.deserialize(
|
| + message.payload);
|
| + _impl.setGetBuffer(params.buffer);
|
| + break;
|
| + case kCommandBuffer_flush_name:
|
| + var params = CommandBufferFlushParams.deserialize(
|
| + message.payload);
|
| + _impl.flush(params.putOffset);
|
| + break;
|
| + case kCommandBuffer_makeProgress_name:
|
| + var params = CommandBufferMakeProgressParams.deserialize(
|
| + message.payload);
|
| + _impl.makeProgress(params.lastGetOffset);
|
| + break;
|
| + case kCommandBuffer_registerTransferBuffer_name:
|
| + var params = CommandBufferRegisterTransferBufferParams.deserialize(
|
| + message.payload);
|
| + _impl.registerTransferBuffer(params.id, params.transferBuffer, params.size);
|
| + break;
|
| + case kCommandBuffer_destroyTransferBuffer_name:
|
| + var params = CommandBufferDestroyTransferBufferParams.deserialize(
|
| + message.payload);
|
| + _impl.destroyTransferBuffer(params.id);
|
| + break;
|
| + case kCommandBuffer_insertSyncPoint_name:
|
| + var params = CommandBufferInsertSyncPointParams.deserialize(
|
| + message.payload);
|
| + _impl.insertSyncPoint(params.retire);
|
| + break;
|
| + case kCommandBuffer_retireSyncPoint_name:
|
| + var params = CommandBufferRetireSyncPointParams.deserialize(
|
| + message.payload);
|
| + _impl.retireSyncPoint(params.syncPoint);
|
| + break;
|
| + case kCommandBuffer_echo_name:
|
| + var params = CommandBufferEchoParams.deserialize(
|
| + message.payload);
|
| + var response = _impl.echo(_CommandBufferEchoResponseParamsFactory);
|
| + if (response is Future) {
|
| + return response.then((response) {
|
| + if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + kCommandBuffer_echo_name,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + });
|
| + } else if (response != null) {
|
| + return buildResponseWithId(
|
| + response,
|
| + kCommandBuffer_echo_name,
|
| + message.header.requestId,
|
| + bindings.MessageHeader.kMessageIsResponse);
|
| + }
|
| + break;
|
| + default:
|
| + throw new bindings.MojoCodecError("Unexpected message name");
|
| + break;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + CommandBuffer get impl => _impl;
|
| + set impl(CommandBuffer d) {
|
| + assert(_impl == null);
|
| + _impl = d;
|
| + }
|
| +
|
| + String toString() {
|
| + var superString = super.toString();
|
| + return "CommandBufferStub($superString)";
|
| + }
|
| +
|
| + int get version => 0;
|
| +}
|
| +
|
| +
|
|
|