| Index: gpu/command_buffer/common/command_buffer.h
|
| diff --git a/gpu/command_buffer/common/command_buffer.h b/gpu/command_buffer/common/command_buffer.h
|
| index b69936320eca53013c0110d77743644c97c14834..23cb406428c06c3511102afc2b77364df65e1d6f 100644
|
| --- a/gpu/command_buffer/common/command_buffer.h
|
| +++ b/gpu/command_buffer/common/command_buffer.h
|
| @@ -5,6 +5,10 @@
|
| #ifndef GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_
|
| #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_
|
|
|
| +#include <stddef.h>
|
| +#include <stdint.h>
|
| +
|
| +#include "base/macros.h"
|
| #include "gpu/command_buffer/common/buffer.h"
|
| #include "gpu/command_buffer/common/constants.h"
|
| #include "gpu/gpu_export.h"
|
| @@ -28,14 +32,14 @@ class GPU_EXPORT CommandBuffer {
|
| }
|
|
|
| // The offset (in entries) from which the reader is reading.
|
| - int32 get_offset;
|
| + int32_t get_offset;
|
|
|
| // The current token value. This is used by the writer to defer
|
| // changes to shared memory objects until the reader has reached a certain
|
| // point in the command buffer. The reader is responsible for updating the
|
| // token value, for example in response to an asynchronous set token command
|
| // embedded in the command buffer. The default token value is zero.
|
| - int32 token;
|
| + int32_t token;
|
|
|
| // Error status.
|
| error::Error error;
|
| @@ -46,12 +50,12 @@ class GPU_EXPORT CommandBuffer {
|
| // Generation index of this state. The generation index is incremented every
|
| // time a new state is retrieved from the command processor, so that
|
| // consistency can be kept even if IPC messages are processed out-of-order.
|
| - uint32 generation;
|
| + uint32_t generation;
|
| };
|
|
|
| struct ConsoleMessage {
|
| // An user supplied id.
|
| - int32 id;
|
| + int32_t id;
|
| // The message.
|
| std::string message;
|
| };
|
| @@ -64,7 +68,7 @@ class GPU_EXPORT CommandBuffer {
|
|
|
| // Check if a value is between a start and end value, inclusive, allowing
|
| // for wrapping if start > end.
|
| - static bool InRange(int32 start, int32 end, int32 value) {
|
| + static bool InRange(int32_t start, int32_t end, int32_t value) {
|
| if (start <= end)
|
| return start <= value && value <= end;
|
| else
|
| @@ -82,38 +86,38 @@ class GPU_EXPORT CommandBuffer {
|
| // fast as it is called for every command where GetLastToken is only called
|
| // by code that needs to know the last token so it can be slower but more up
|
| // to date than GetLastState.
|
| - virtual int32 GetLastToken() = 0;
|
| + virtual int32_t GetLastToken() = 0;
|
|
|
| // The writer calls this to update its put offset. This ensures the reader
|
| // sees the latest added commands, and will eventually process them. On the
|
| // service side, commands are processed up to the given put_offset before
|
| // subsequent Flushes on the same GpuChannel.
|
| - virtual void Flush(int32 put_offset) = 0;
|
| + virtual void Flush(int32_t put_offset) = 0;
|
|
|
| // As Flush, ensures that on the service side, commands up to put_offset
|
| // are processed but before subsequent commands on the same GpuChannel but
|
| // flushing to the service may be deferred.
|
| - virtual void OrderingBarrier(int32 put_offset) = 0;
|
| + virtual void OrderingBarrier(int32_t put_offset) = 0;
|
|
|
| // The writer calls this to wait until the current token is within a
|
| // specific range, inclusive. Can return early if an error is generated.
|
| - virtual void WaitForTokenInRange(int32 start, int32 end) = 0;
|
| + virtual void WaitForTokenInRange(int32_t start, int32_t end) = 0;
|
|
|
| // The writer calls this to wait until the current get offset is within a
|
| // specific range, inclusive. Can return early if an error is generated.
|
| - virtual void WaitForGetOffsetInRange(int32 start, int32 end) = 0;
|
| + virtual void WaitForGetOffsetInRange(int32_t start, int32_t end) = 0;
|
|
|
| // Sets the buffer commands are read from.
|
| // Also resets the get and put offsets to 0.
|
| - virtual void SetGetBuffer(int32 transfer_buffer_id) = 0;
|
| + virtual void SetGetBuffer(int32_t transfer_buffer_id) = 0;
|
|
|
| // Create a transfer buffer of the given size. Returns its ID or -1 on
|
| // error.
|
| virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
|
| - int32* id) = 0;
|
| + int32_t* id) = 0;
|
|
|
| // Destroy a transfer buffer. The ID must be positive.
|
| - virtual void DestroyTransferBuffer(int32 id) = 0;
|
| + virtual void DestroyTransferBuffer(int32_t id) = 0;
|
|
|
| // The NaCl Win64 build only really needs the struct definitions above; having
|
| // GetLastError declared would mean we'd have to also define it, and pull more
|
|
|