Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: gpu/command_buffer/client/ring_buffer_test.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/ring_buffer.cc ('k') | gpu/command_buffer/client/share_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/ring_buffer_test.cc
diff --git a/gpu/command_buffer/client/ring_buffer_test.cc b/gpu/command_buffer/client/ring_buffer_test.cc
index ac3c8d756205026f6b6df09c4202971adf6730c5..e6d11f7290eb1a742d2baaff51a4e4bf085ee9b5 100644
--- a/gpu/command_buffer/client/ring_buffer_test.cc
+++ b/gpu/command_buffer/client/ring_buffer_test.cc
@@ -6,6 +6,8 @@
#include "gpu/command_buffer/client/ring_buffer.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
@@ -87,9 +89,7 @@ class BaseRingBufferTest : public testing::Test {
helper_->Initialize(kBufferSize);
}
- int32 GetToken() {
- return command_buffer_->GetLastState().token;
- }
+ int32_t GetToken() { return command_buffer_->GetLastState().token; }
scoped_ptr<AsyncAPIMock> api_mock_;
scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_;
@@ -99,8 +99,8 @@ class BaseRingBufferTest : public testing::Test {
std::vector<const void*> set_token_arguments_;
bool delay_set_token_;
- scoped_ptr<int8[]> buffer_;
- int8* buffer_start_;
+ scoped_ptr<int8_t[]> buffer_;
+ int8_t* buffer_start_;
base::MessageLoop message_loop_;
};
@@ -118,7 +118,7 @@ class RingBufferTest : public BaseRingBufferTest {
void SetUp() override {
BaseRingBufferTest::SetUp();
- buffer_.reset(new int8[kBufferSize + kBaseOffset]);
+ buffer_.reset(new int8_t[kBufferSize + kBaseOffset]);
buffer_start_ = buffer_.get() + kBaseOffset;
allocator_.reset(new RingBuffer(kAlignment, kBaseOffset, kBufferSize,
helper_.get(), buffer_start_));
@@ -143,7 +143,7 @@ TEST_F(RingBufferTest, TestBasic) {
EXPECT_GE(kBufferSize, allocator_->GetOffset(pointer) - kBaseOffset + kSize);
EXPECT_EQ(kBufferSize, allocator_->GetLargestFreeOrPendingSize());
EXPECT_EQ(kBufferSize - kSize, allocator_->GetLargestFreeSizeNoWaiting());
- int32 token = helper_->InsertToken();
+ int32_t token = helper_->InsertToken();
allocator_->FreePendingToken(pointer, token);
}
@@ -155,7 +155,7 @@ TEST_F(RingBufferTest, TestFreePendingToken) {
delay_set_token_ = true;
// Allocate several buffers to fill in the memory.
- int32 tokens[kAllocCount];
+ int32_t tokens[kAllocCount];
for (unsigned int ii = 0; ii < kAllocCount; ++ii) {
void* pointer = allocator_->Alloc(kSize);
EXPECT_GE(kBufferSize,
« no previous file with comments | « gpu/command_buffer/client/ring_buffer.cc ('k') | gpu/command_buffer/client/share_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698