| Index: gpu/command_buffer/common/cmd_buffer_common.h
|
| diff --git a/gpu/command_buffer/common/cmd_buffer_common.h b/gpu/command_buffer/common/cmd_buffer_common.h
|
| index cf09378e00c4d17630860471560d67b14a1960fb..48c92104c561af9ed09533194335b7a0bc90d54c 100644
|
| --- a/gpu/command_buffer/common/cmd_buffer_common.h
|
| +++ b/gpu/command_buffer/common/cmd_buffer_common.h
|
| @@ -155,6 +155,7 @@ namespace cmd {
|
| OP(SetBucketDataImmediate) /* 4 */ \
|
| OP(GetBucketStart) /* 5 */ \
|
| OP(GetBucketData) /* 6 */ \
|
| + OP(SetAsyncToken) /* 7 */ \
|
|
|
| // Common commands.
|
| enum CommandId {
|
| @@ -223,6 +224,29 @@ struct SetToken {
|
| uint32 token;
|
| };
|
|
|
| +struct SetAsyncToken {
|
| + typedef SetAsyncToken ValueType;
|
| + static const CommandId kCmdId = kSetAsyncToken;
|
| + static const cmd::ArgFlags kArgFlags = cmd::kFixed;
|
| +
|
| + void SetHeader() {
|
| + header.SetCmd<ValueType>();
|
| + }
|
| +
|
| + void Init(uint32 _async_token) {
|
| + SetHeader();
|
| + async_token = _async_token;
|
| + }
|
| +
|
| + static void* Set(void* cmd, uint32 async_token) {
|
| + static_cast<ValueType*>(cmd)->Init(async_token);
|
| + return NextCmdAddress<ValueType>(cmd);
|
| + }
|
| +
|
| + CommandHeader header;
|
| + uint32 async_token;
|
| +};
|
| +
|
| COMPILE_ASSERT(sizeof(SetToken) == 8, Sizeof_SetToken_is_not_8);
|
| COMPILE_ASSERT(offsetof(SetToken, header) == 0,
|
| Offsetof_SetToken_header_not_0);
|
|
|