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

Unified Diff: gpu/command_buffer/tests/gl_ext_blend_func_extended_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_ext_blend_func_extended_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_ext_blend_func_extended_unittest.cc b/gpu/command_buffer/tests/gl_ext_blend_func_extended_unittest.cc
index d2f01ab58c4ec09f4df7f7f4448dae569edafb89..35d74b1a609da1beb8c7f074ee0858dbc9ca7688 100644
--- a/gpu/command_buffer/tests/gl_ext_blend_func_extended_unittest.cc
+++ b/gpu/command_buffer/tests/gl_ext_blend_func_extended_unittest.cc
@@ -6,6 +6,7 @@
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <GLES3/gl3.h>
+#include <stdint.h>
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
@@ -44,7 +45,7 @@ template <int RGBs, int RGBd, int As, int Ad>
void BlendEquationFuncAdd(float dst[4],
float src[4],
float src1[4],
- uint8 result[4]) {
+ uint8_t result[4]) {
float r[4];
r[0] = src[0] * Weight<RGBs, 0>(dst, src, src1) +
dst[0] * Weight<RGBd, 0>(dst, src, src1);
@@ -55,7 +56,7 @@ void BlendEquationFuncAdd(float dst[4],
r[3] = src[3] * Weight<As, 3>(dst, src, src1) +
dst[3] * Weight<Ad, 3>(dst, src, src1);
for (int i = 0; i < 4; ++i) {
- result[i] = static_cast<uint8>(
+ result[i] = static_cast<uint8_t>(
std::floor(std::max(0.0f, std::min(1.0f, r[i])) * 255.0f));
}
}
@@ -180,7 +181,7 @@ class EXTBlendFuncExtendedDrawTest : public testing::TestWithParam<bool> {
glDrawArrays(GL_TRIANGLES, 0, 6);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
// Verify.
- uint8 color[4];
+ uint8_t color[4];
BlendEquationFuncAdd<GL_SRC1_COLOR_EXT, GL_SRC_ALPHA,
GL_ONE_MINUS_SRC1_COLOR_EXT,
GL_ONE_MINUS_SRC1_ALPHA_EXT>(kDst, kSrc, kSrc1, color);

Powered by Google App Engine
This is Rietveld 408576698