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

Unified Diff: gpu/command_buffer/service/context_group.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/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index b90177c9c12fb43fe290e9357e8a173ea941a2ff..bbd7c8143fa381b56f06c4b290fdd93fe139a6e4 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -4,6 +4,9 @@
#include "gpu/command_buffer/service/context_group.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <string>
@@ -84,7 +87,7 @@ ContextGroup::ContextGroup(
}
}
-static void GetIntegerv(GLenum pname, uint32* var) {
+static void GetIntegerv(GLenum pname, uint32_t* var) {
GLint value = 0;
glGetIntegerv(pname, &value);
*var = value;
@@ -276,18 +279,19 @@ bool ContextGroup::Initialize(GLES2Decoder* decoder,
if (feature_info_->workarounds().max_fragment_uniform_vectors) {
max_fragment_uniform_vectors_ = std::min(
max_fragment_uniform_vectors_,
- static_cast<uint32>(
+ static_cast<uint32_t>(
feature_info_->workarounds().max_fragment_uniform_vectors));
}
if (feature_info_->workarounds().max_varying_vectors) {
- max_varying_vectors_ = std::min(
- max_varying_vectors_,
- static_cast<uint32>(feature_info_->workarounds().max_varying_vectors));
+ max_varying_vectors_ =
+ std::min(max_varying_vectors_,
+ static_cast<uint32_t>(
+ feature_info_->workarounds().max_varying_vectors));
}
if (feature_info_->workarounds().max_vertex_uniform_vectors) {
max_vertex_uniform_vectors_ =
std::min(max_vertex_uniform_vectors_,
- static_cast<uint32>(
+ static_cast<uint32_t>(
feature_info_->workarounds().max_vertex_uniform_vectors));
}
@@ -393,8 +397,8 @@ void ContextGroup::Destroy(GLES2Decoder* decoder, bool have_context) {
memory_tracker_ = NULL;
}
-uint32 ContextGroup::GetMemRepresented() const {
- uint32 total = 0;
+uint32_t ContextGroup::GetMemRepresented() const {
+ uint32_t total = 0;
if (buffer_manager_.get())
total += buffer_manager_->mem_represented();
if (renderbuffer_manager_.get())
@@ -425,7 +429,7 @@ bool ContextGroup::CheckGLFeature(GLint min_required, GLint* v) {
return value >= min_required;
}
-bool ContextGroup::CheckGLFeatureU(GLint min_required, uint32* v) {
+bool ContextGroup::CheckGLFeatureU(GLint min_required, uint32_t* v) {
GLint value = *v;
if (enforce_gl_minimums_) {
value = std::min(min_required, value);
@@ -442,9 +446,10 @@ bool ContextGroup::QueryGLFeature(
return CheckGLFeature(min_required, v);
}
-bool ContextGroup::QueryGLFeatureU(
- GLenum pname, GLint min_required, uint32* v) {
- uint32 value = 0;
+bool ContextGroup::QueryGLFeatureU(GLenum pname,
+ GLint min_required,
+ uint32_t* v) {
+ uint32_t value = 0;
GetIntegerv(pname, &value);
bool result = CheckGLFeatureU(min_required, &value);
*v = value;
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698