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

Unified Diff: gpu/command_buffer/tests/gl_pointcoord_unittest.cc

Issue 11568033: Small fixes to allow unit tests to compile with gcc 4.7.x (tested with gcc 4.7.2) (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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_pointcoord_unittest.cc
===================================================================
--- gpu/command_buffer/tests/gl_pointcoord_unittest.cc (revision 174065)
+++ gpu/command_buffer/tests/gl_pointcoord_unittest.cc (working copy)
@@ -40,10 +40,10 @@
glGenBuffers(1, &vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
float vertices[] = {
- -0.5 + pixel_offset, -0.5 + pixel_offset,
- 0.5 + pixel_offset, -0.5 + pixel_offset,
- -0.5 + pixel_offset, 0.5 + pixel_offset,
- 0.5 + pixel_offset, 0.5 + pixel_offset,
+ -0.5f + pixel_offset, -0.5f + pixel_offset,
+ 0.5f + pixel_offset, -0.5f + pixel_offset,
+ -0.5f + pixel_offset, 0.5f + pixel_offset,
+ 0.5f + pixel_offset, 0.5f + pixel_offset,
};
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(position_location);
@@ -136,8 +136,8 @@
GLfloat s = 0.5 + (xf + 0.5 - xw) / max_point_size;
GLfloat t = 0.5 + (yf + 0.5 - yw) / max_point_size;
uint8 color[4] = {
- s * 255,
- (1 - t) * 255,
+ static_cast<uint8>(s * 255),
+ static_cast<uint8>((1 - t) * 255),
0,
255,
};
« no previous file with comments | « chrome/browser/predictors/autocomplete_action_predictor_unittest.cc ('k') | net/base/x509_util_nss_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698