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

Unified Diff: gpu/command_buffer/client/mapped_memory.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/mapped_memory.h ('k') | gpu/command_buffer/client/mapped_memory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/mapped_memory.cc
diff --git a/gpu/command_buffer/client/mapped_memory.cc b/gpu/command_buffer/client/mapped_memory.cc
index dcfead2214acc0c9993066cb81f5fb1a01616c49..c40278e27203cfba27bb5b2f8deddb17c7d0698d 100644
--- a/gpu/command_buffer/client/mapped_memory.cc
+++ b/gpu/command_buffer/client/mapped_memory.cc
@@ -4,6 +4,9 @@
#include "gpu/command_buffer/client/mapped_memory.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <functional>
@@ -25,7 +28,7 @@ base::StaticAtomicSequenceNumber g_next_mapped_memory_manager_tracing_id;
} // namespace
-MemoryChunk::MemoryChunk(int32 shm_id,
+MemoryChunk::MemoryChunk(int32_t shm_id,
scoped_refptr<gpu::Buffer> shm,
CommandBufferHelper* helper)
: shm_id_(shm_id),
@@ -61,8 +64,9 @@ MappedMemoryManager::~MappedMemoryManager() {
}
}
-void* MappedMemoryManager::Alloc(
- unsigned int size, int32* shm_id, unsigned int* shm_offset) {
+void* MappedMemoryManager::Alloc(unsigned int size,
+ int32_t* shm_id,
+ unsigned int* shm_offset) {
DCHECK(shm_id);
DCHECK(shm_offset);
if (size <= allocated_memory_) {
@@ -108,7 +112,7 @@ void* MappedMemoryManager::Alloc(
unsigned int chunk_size =
((size + chunk_size_multiple_ - 1) / chunk_size_multiple_) *
chunk_size_multiple_;
- int32 id = -1;
+ int32_t id = -1;
scoped_refptr<gpu::Buffer> shm =
cmd_buf->CreateTransferBuffer(chunk_size, &id);
if (id < 0)
@@ -134,7 +138,7 @@ void MappedMemoryManager::Free(void* pointer) {
NOTREACHED();
}
-void MappedMemoryManager::FreePendingToken(void* pointer, int32 token) {
+void MappedMemoryManager::FreePendingToken(void* pointer, int32_t token) {
for (auto& chunk : chunks_) {
if (chunk->IsInChunk(pointer)) {
chunk->FreePendingToken(pointer, token);
@@ -163,7 +167,7 @@ void MappedMemoryManager::FreeUnused() {
bool MappedMemoryManager::OnMemoryDump(
const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) {
- const uint64 tracing_process_id =
+ const uint64_t tracing_process_id =
base::trace_event::MemoryDumpManager::GetInstance()
->GetTracingProcessId();
« no previous file with comments | « gpu/command_buffer/client/mapped_memory.h ('k') | gpu/command_buffer/client/mapped_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698