| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
| 6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "gpu/command_buffer/tests/gl_manager.h" | 9 #include "gpu/command_buffer/tests/gl_manager.h" |
| 10 #include "gpu/command_buffer/tests/gl_test_utils.h" | 10 #include "gpu/command_buffer/tests/gl_test_utils.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 GLfloat u = xx / max_point_size * 2 - 1; | 131 GLfloat u = xx / max_point_size * 2 - 1; |
| 132 GLfloat v = yy / max_point_size * 2 - 1; | 132 GLfloat v = yy / max_point_size * 2 - 1; |
| 133 GLint xf = s2p(point_x + u * point_width); | 133 GLint xf = s2p(point_x + u * point_width); |
| 134 GLint yf = s2p(point_y + v * point_width); | 134 GLint yf = s2p(point_y + v * point_width); |
| 135 GLfloat s = 0.5 + (xf + 0.5 - xw) / max_point_size; | 135 GLfloat s = 0.5 + (xf + 0.5 - xw) / max_point_size; |
| 136 GLfloat t = 0.5 + (yf + 0.5 - yw) / max_point_size; | 136 GLfloat t = 0.5 + (yf + 0.5 - yw) / max_point_size; |
| 137 uint8_t color[4] = { | 137 uint8_t color[4] = { |
| 138 static_cast<uint8_t>(s * 255), | 138 static_cast<uint8_t>(s * 255), |
| 139 static_cast<uint8_t>((1 - t) * 255), 0, 255, | 139 static_cast<uint8_t>((1 - t) * 255), 0, 255, |
| 140 }; | 140 }; |
| 141 GLTestHelper::CheckPixels(xf, yf, 1, 1, 4, color); | 141 GLTestHelper::CheckPixels(xf, yf, 1, 1, 4, color, nullptr); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 GLTestHelper::CheckGLError("no errors", __LINE__); | 147 GLTestHelper::CheckGLError("no errors", __LINE__); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace gpu | 150 } // namespace gpu |
| 151 | 151 |
| 152 | 152 |
| 153 | 153 |
| OLD | NEW |