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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.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
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
index 1b3feaa9a8d71145931deaaf5a16cb1bd7ec5cd4..5301a4999be7c40c2ea73f7f508bc828ccf96232 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
@@ -4,6 +4,8 @@
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include <stdint.h>
+
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
@@ -86,8 +88,8 @@ class GLES2DecoderRestoreStateTest : public GLES2DecoderManualInitTest {
void AddExpectationsForActiveTexture(GLenum unit);
void AddExpectationsForBindTexture(GLenum target, GLuint id);
void InitializeContextState(ContextState* state,
- uint32 non_default_unit,
- uint32 active_unit);
+ uint32_t non_default_unit,
+ uint32_t active_unit);
};
INSTANTIATE_TEST_CASE_P(Service,
@@ -106,10 +108,10 @@ void GLES2DecoderRestoreStateTest::AddExpectationsForBindTexture(GLenum target,
void GLES2DecoderRestoreStateTest::InitializeContextState(
ContextState* state,
- uint32 non_default_unit,
- uint32 active_unit) {
+ uint32_t non_default_unit,
+ uint32_t active_unit) {
state->texture_units.resize(group().max_texture_units());
- for (uint32 tt = 0; tt < state->texture_units.size(); ++tt) {
+ for (uint32_t tt = 0; tt < state->texture_units.size(); ++tt) {
TextureRef* ref_cube_map =
group().texture_manager()->GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP);
state->texture_units[tt].bound_texture_cube_map = ref_cube_map;
@@ -136,7 +138,7 @@ TEST_P(GLES2DecoderRestoreStateTest, NullPreviousStateBGR) {
TestHelper::kServiceDefaultTextureCubemapId);
// Expect to restore texture bindings for remaining units.
- for (uint32 i = 1; i < group().max_texture_units(); ++i) {
+ for (uint32_t i = 1; i < group().max_texture_units(); ++i) {
AddExpectationsForActiveTexture(GL_TEXTURE0 + i);
AddExpectationsForBindTexture(GL_TEXTURE_2D,
TestHelper::kServiceDefaultTexture2dId);
@@ -162,7 +164,7 @@ TEST_P(GLES2DecoderRestoreStateTest, NullPreviousState) {
AddExpectationsForBindTexture(GL_TEXTURE_CUBE_MAP, 0);
// Expect to restore texture bindings for remaining units.
- for (uint32 i = 1; i < group().max_texture_units(); ++i) {
+ for (uint32_t i = 1; i < group().max_texture_units(); ++i) {
AddExpectationsForActiveTexture(GL_TEXTURE0 + i);
AddExpectationsForBindTexture(GL_TEXTURE_2D, 0);
AddExpectationsForBindTexture(GL_TEXTURE_CUBE_MAP, 0);
@@ -183,7 +185,7 @@ TEST_P(GLES2DecoderRestoreStateTest, WithPreviousStateBGR) {
// Construct a previous ContextState with all texture bindings
// set to default textures.
ContextState prev_state(NULL, NULL, NULL);
- InitializeContextState(&prev_state, std::numeric_limits<uint32>::max(), 0);
+ InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0);
InSequence sequence;
// Expect to restore only GL_TEXTURE_2D binding for GL_TEXTURE0 unit,
@@ -206,7 +208,7 @@ TEST_P(GLES2DecoderRestoreStateTest, WithPreviousState) {
// Construct a previous ContextState with all texture bindings
// set to default textures.
ContextState prev_state(NULL, NULL, NULL);
- InitializeContextState(&prev_state, std::numeric_limits<uint32>::max(), 0);
+ InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0);
InSequence sequence;
// Expect to restore only GL_TEXTURE_2D binding for GL_TEXTURE0 unit,
@@ -236,7 +238,7 @@ TEST_P(GLES2DecoderRestoreStateTest, ActiveUnit1) {
// Construct a previous ContextState with all texture bindings
// set to default textures.
ContextState prev_state(NULL, NULL, NULL);
- InitializeContextState(&prev_state, std::numeric_limits<uint32>::max(), 0);
+ InitializeContextState(&prev_state, std::numeric_limits<uint32_t>::max(), 0);
InSequence sequence;
// Expect to restore only GL_TEXTURE_2D binding for GL_TEXTURE1 unit,

Powered by Google App Engine
This is Rietveld 408576698