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

Unified Diff: gpu/command_buffer/tests/gl_unittest.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/tests/gl_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_unittest.cc b/gpu/command_buffer/tests/gl_unittest.cc
index 70d35df05536b3fd49dcd488fd05aabc36af1271..2eb1211531a678b68636bfaeacb3233f946f5610 100644
--- a/gpu/command_buffer/tests/gl_unittest.cc
+++ b/gpu/command_buffer/tests/gl_unittest.cc
@@ -4,6 +4,7 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include <stdint.h>
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/tests/gl_manager.h"
@@ -26,7 +27,9 @@ class GLTest : public testing::Test {
TEST_F(GLTest, Basic) {
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
- uint8 expected[] = { 0, 255, 0, 255, };
+ uint8_t expected[] = {
+ 0, 255, 0, 255,
+ };
EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected));
GLTestHelper::CheckGLError("no errors", __LINE__);
}
@@ -37,7 +40,7 @@ TEST_F(GLTest, BasicFBO) {
GLuint fbo = 0;
glGenFramebuffers(1, &fbo);
glBindTexture(GL_TEXTURE_2D, tex);
- scoped_ptr<uint8[]> pixels(new uint8 [16*16*4]);
+ scoped_ptr<uint8_t[]> pixels(new uint8_t[16 * 16 * 4]);
memset(pixels.get(), 0, 16*16*4);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE,
pixels.get());
@@ -53,7 +56,9 @@ TEST_F(GLTest, BasicFBO) {
glCheckFramebufferStatus(GL_FRAMEBUFFER));
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
- uint8 expected[] = { 0, 255, 0, 255, };
+ uint8_t expected[] = {
+ 0, 255, 0, 255,
+ };
EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 16, 16, 0, expected));
glDeleteFramebuffers(1, &fbo);
glDeleteTextures(1, &tex);
@@ -80,11 +85,15 @@ TEST_F(GLTest, SimpleShader) {
GLTestHelper::SetupUnitQuad(position_loc);
- uint8 expected_clear[] = { 127, 0, 255, 0, };
+ uint8_t expected_clear[] = {
+ 127, 0, 255, 0,
+ };
glClearColor(0.5f, 0.0f, 1.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT);
EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 1, expected_clear));
- uint8 expected_draw[] = { 0, 255, 0, 255, };
+ uint8_t expected_draw[] = {
+ 0, 255, 0, 255,
+ };
glDrawArrays(GL_TRIANGLES, 0, 6);
EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_draw));
}
« no previous file with comments | « gpu/command_buffer/tests/gl_texture_storage_unittest.cc ('k') | gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698