| 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 e8989be2894cd07a60fa4a04dce85e53d5d398c0..38acf4a6e9cde51386ed95daa102638c080c65b0 100644
|
| --- a/gpu/command_buffer/common/cmd_buffer_common.h
|
| +++ b/gpu/command_buffer/common/cmd_buffer_common.h
|
| @@ -79,6 +79,11 @@ struct CommandHeader {
|
| DCHECK_GE(size_in_bytes, sizeof(T)); // NOLINT
|
| Init(T::kCmdId, ComputeNumEntries(size_in_bytes));
|
| }
|
| +
|
| + static CommandHeader FromVolatile(const volatile CommandHeader& other) {
|
| + // const_cast is safe because the copy constructor is trivial.
|
| + return const_cast<const CommandHeader&>(other);
|
| + }
|
| };
|
|
|
| static_assert(sizeof(CommandHeader) == 4,
|
|
|