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

Unified Diff: gpu/command_buffer/common/buffer.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/common/buffer.h ('k') | gpu/command_buffer/common/cmd_buffer_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/buffer.cc
diff --git a/gpu/command_buffer/common/buffer.cc b/gpu/command_buffer/common/buffer.cc
index 8ddcf197d9a7c18290b1e823151e8f7310871353..02c7777898de7f90c62390c7e4587599eb2e0ee2 100644
--- a/gpu/command_buffer/common/buffer.cc
+++ b/gpu/command_buffer/common/buffer.cc
@@ -4,6 +4,9 @@
#include "gpu/command_buffer/common/buffer.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/numerics/safe_math.h"
@@ -32,12 +35,12 @@ Buffer::Buffer(scoped_ptr<BufferBacking> backing)
Buffer::~Buffer() {}
-void* Buffer::GetDataAddress(uint32 data_offset, uint32 data_size) const {
- base::CheckedNumeric<uint32> end = data_offset;
+void* Buffer::GetDataAddress(uint32_t data_offset, uint32_t data_size) const {
+ base::CheckedNumeric<uint32_t> end = data_offset;
end += data_size;
- if (!end.IsValid() || end.ValueOrDie() > static_cast<uint32>(size_))
+ if (!end.IsValid() || end.ValueOrDie() > static_cast<uint32_t>(size_))
return NULL;
- return static_cast<uint8*>(memory_) + data_offset;
+ return static_cast<uint8_t*>(memory_) + data_offset;
}
base::trace_event::MemoryAllocatorDumpGuid GetBufferGUIDForTracing(
« no previous file with comments | « gpu/command_buffer/common/buffer.h ('k') | gpu/command_buffer/common/cmd_buffer_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698