| Index: gpu/command_buffer/common/gles2_cmd_utils.h
|
| diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
|
| index 1ec812a8bfd2f565df860ca939948e0614b40fbd..875bc35d2d54366b93ad9ef2ccb5087c38746169 100644
|
| --- a/gpu/command_buffer/common/gles2_cmd_utils.h
|
| +++ b/gpu/command_buffer/common/gles2_cmd_utils.h
|
| @@ -57,19 +57,19 @@ inline bool SafeAddInt32(int32_t a, int32_t b, int32_t* dst) {
|
|
|
| // Returns the address of the first byte after a struct.
|
| template <typename T>
|
| -const void* AddressAfterStruct(const T& pod) {
|
| - return reinterpret_cast<const uint8_t*>(&pod) + sizeof(pod);
|
| +const volatile void* AddressAfterStruct(const volatile T& pod) {
|
| + return reinterpret_cast<const volatile uint8_t*>(&pod) + sizeof(pod);
|
| }
|
|
|
| // Returns the address of the frst byte after the struct or NULL if size >
|
| // immediate_data_size.
|
| template <typename RETURN_TYPE, typename COMMAND_TYPE>
|
| -RETURN_TYPE GetImmediateDataAs(const COMMAND_TYPE& pod,
|
| +RETURN_TYPE GetImmediateDataAs(const volatile COMMAND_TYPE& pod,
|
| uint32_t size,
|
| uint32_t immediate_data_size) {
|
| return (size <= immediate_data_size)
|
| ? static_cast<RETURN_TYPE>(
|
| - const_cast<void*>(AddressAfterStruct(pod)))
|
| + const_cast<volatile void*>(AddressAfterStruct(pod)))
|
| : NULL;
|
| }
|
|
|
|
|