| Index: gpu/command_buffer/client/client_test_helper.cc
|
| diff --git a/gpu/command_buffer/client/client_test_helper.cc b/gpu/command_buffer/client/client_test_helper.cc
|
| index f3179024995540e43888d7e0a765e822e43ba715..3e8c43c816fe2d717e6ee3df036e017337bfd188 100644
|
| --- a/gpu/command_buffer/client/client_test_helper.cc
|
| +++ b/gpu/command_buffer/client/client_test_helper.cc
|
| @@ -6,8 +6,11 @@
|
|
|
| #include "gpu/command_buffer/client/client_test_helper.h"
|
|
|
| -#include "gpu/command_buffer/common/command_buffer.h"
|
| +#include <stddef.h>
|
| +#include <stdint.h>
|
| +
|
| #include "gpu/command_buffer/client/cmd_buffer_helper.h"
|
| +#include "gpu/command_buffer/common/command_buffer.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| using ::testing::_;
|
| @@ -29,17 +32,18 @@ CommandBuffer::State MockCommandBufferBase::GetLastState() {
|
| return state_;
|
| }
|
|
|
| -int32 MockCommandBufferBase::GetLastToken() {
|
| +int32_t MockCommandBufferBase::GetLastToken() {
|
| return state_.token;
|
| }
|
|
|
| -void MockCommandBufferBase::SetGetOffset(int32 get_offset) {
|
| +void MockCommandBufferBase::SetGetOffset(int32_t get_offset) {
|
| state_.get_offset = get_offset;
|
| }
|
|
|
| -void MockCommandBufferBase::WaitForTokenInRange(int32 start, int32 end) {}
|
| +void MockCommandBufferBase::WaitForTokenInRange(int32_t start, int32_t end) {}
|
|
|
| -void MockCommandBufferBase::WaitForGetOffsetInRange(int32 start, int32 end) {
|
| +void MockCommandBufferBase::WaitForGetOffsetInRange(int32_t start,
|
| + int32_t end) {
|
| state_.get_offset = put_offset_;
|
| OnFlush();
|
| }
|
| @@ -53,7 +57,7 @@ void MockCommandBufferBase::SetGetBuffer(int transfer_buffer_id) {
|
|
|
| // Get's the Id of the next transfer buffer that will be returned
|
| // by CreateTransferBuffer. This is useful for testing expected ids.
|
| -int32 MockCommandBufferBase::GetNextFreeTransferBufferId() {
|
| +int32_t MockCommandBufferBase::GetNextFreeTransferBufferId() {
|
| for (size_t ii = 0; ii < arraysize(transfer_buffer_buffers_); ++ii) {
|
| if (!transfer_buffer_buffers_[ii].get()) {
|
| return kTransferBufferBaseId + ii;
|
| @@ -64,10 +68,10 @@ int32 MockCommandBufferBase::GetNextFreeTransferBufferId() {
|
|
|
| scoped_refptr<gpu::Buffer> MockCommandBufferBase::CreateTransferBuffer(
|
| size_t size,
|
| - int32* id) {
|
| + int32_t* id) {
|
| *id = GetNextFreeTransferBufferId();
|
| if (*id >= 0) {
|
| - int32 ndx = *id - kTransferBufferBaseId;
|
| + int32_t ndx = *id - kTransferBufferBaseId;
|
| scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory());
|
| shared_memory->CreateAndMapAnonymous(size);
|
| transfer_buffer_buffers_[ndx] =
|
| @@ -76,24 +80,24 @@ scoped_refptr<gpu::Buffer> MockCommandBufferBase::CreateTransferBuffer(
|
| return GetTransferBuffer(*id);
|
| }
|
|
|
| -void MockCommandBufferBase::DestroyTransferBufferHelper(int32 id) {
|
| +void MockCommandBufferBase::DestroyTransferBufferHelper(int32_t id) {
|
| DCHECK_GE(id, kTransferBufferBaseId);
|
| DCHECK_LT(id, kTransferBufferBaseId + kMaxTransferBuffers);
|
| id -= kTransferBufferBaseId;
|
| transfer_buffer_buffers_[id] = NULL;
|
| }
|
|
|
| -scoped_refptr<Buffer> MockCommandBufferBase::GetTransferBuffer(int32 id) {
|
| +scoped_refptr<Buffer> MockCommandBufferBase::GetTransferBuffer(int32_t id) {
|
| DCHECK_GE(id, kTransferBufferBaseId);
|
| DCHECK_LT(id, kTransferBufferBaseId + kMaxTransferBuffers);
|
| return transfer_buffer_buffers_[id - kTransferBufferBaseId];
|
| }
|
|
|
| -void MockCommandBufferBase::FlushHelper(int32 put_offset) {
|
| +void MockCommandBufferBase::FlushHelper(int32_t put_offset) {
|
| put_offset_ = put_offset;
|
| }
|
|
|
| -void MockCommandBufferBase::SetToken(int32 token) {
|
| +void MockCommandBufferBase::SetToken(int32_t token) {
|
| NOTREACHED();
|
| state_.token = token;
|
| }
|
| @@ -109,14 +113,14 @@ void MockCommandBufferBase::SetContextLostReason(
|
| state_.context_lost_reason = reason;
|
| }
|
|
|
| -int32 MockCommandBufferBase::GetPutOffset() {
|
| +int32_t MockCommandBufferBase::GetPutOffset() {
|
| return put_offset_;
|
| }
|
|
|
| // GCC requires these declarations, but MSVC requires they not be present
|
| #ifndef _MSC_VER
|
| -const int32 MockCommandBufferBase::kTransferBufferBaseId;
|
| -const int32 MockCommandBufferBase::kMaxTransferBuffers;
|
| +const int32_t MockCommandBufferBase::kTransferBufferBaseId;
|
| +const int32_t MockCommandBufferBase::kMaxTransferBuffers;
|
| #endif
|
|
|
| MockClientCommandBuffer::MockClientCommandBuffer() {
|
| @@ -126,11 +130,11 @@ MockClientCommandBuffer::MockClientCommandBuffer() {
|
| MockClientCommandBuffer::~MockClientCommandBuffer() {
|
| }
|
|
|
| -void MockClientCommandBuffer::Flush(int32 put_offset) {
|
| +void MockClientCommandBuffer::Flush(int32_t put_offset) {
|
| FlushHelper(put_offset);
|
| }
|
|
|
| -void MockClientCommandBuffer::OrderingBarrier(int32 put_offset) {
|
| +void MockClientCommandBuffer::OrderingBarrier(int32_t put_offset) {
|
| FlushHelper(put_offset);
|
| }
|
|
|
|
|