| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <GLES2/gl2extchromium.h> | 7 #include <GLES2/gl2extchromium.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 GLint compile_status = 0; | 134 GLint compile_status = 0; |
| 135 glGetShaderiv(shader, GL_COMPILE_STATUS, &compile_status); | 135 glGetShaderiv(shader, GL_COMPILE_STATUS, &compile_status); |
| 136 if (compile_status != GL_TRUE) { | 136 if (compile_status != GL_TRUE) { |
| 137 glDeleteShader(shader); | 137 glDeleteShader(shader); |
| 138 shader = 0; | 138 shader = 0; |
| 139 } | 139 } |
| 140 | 140 |
| 141 return shader; | 141 return shader; |
| 142 } | 142 } |
| 143 | 143 |
| 144 // TODO(zmo): ReadPixels with float type isn't implemented in ANGLE ES2 | 144 TEST_F(GLReadbackTest, ReadPixelsFloat) { |
| 145 // backend. crbug.com/607283. | |
| 146 #if defined(OS_WIN) | |
| 147 #define MAYBE_ReadPixelsFloat DISABLED_ReadPixelsFloat | |
| 148 #else | |
| 149 #define MAYBE_ReadPixelsFloat ReadPixelsFloat | |
| 150 #endif | |
| 151 TEST_F(GLReadbackTest, MAYBE_ReadPixelsFloat) { | |
| 152 const GLsizei kTextureSize = 4; | 145 const GLsizei kTextureSize = 4; |
| 153 const GLfloat kDrawColor[4] = { -10.9f, 0.5f, 10.5f, 100.12f }; | 146 const GLfloat kDrawColor[4] = { -10.9f, 0.5f, 10.5f, 100.12f }; |
| 154 const GLfloat kEpsilon = 0.01f; | 147 const GLfloat kEpsilon = 0.01f; |
| 155 | 148 |
| 156 struct TestFormat { | 149 struct TestFormat { |
| 157 GLint format; | 150 GLint format; |
| 158 GLint type; | 151 GLint type; |
| 159 uint32_t comp_count; | 152 uint32_t comp_count; |
| 160 }; | 153 }; |
| 161 TestFormat test_formats[4]; | 154 TestFormat test_formats[4]; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 313 |
| 321 glDeleteFramebuffers(1, &framebuffer); | 314 glDeleteFramebuffers(1, &framebuffer); |
| 322 glDeleteTextures(1, &texture_id); | 315 glDeleteTextures(1, &texture_id); |
| 323 } | 316 } |
| 324 | 317 |
| 325 glDeleteBuffers(1, &vertex_buffer); | 318 glDeleteBuffers(1, &vertex_buffer); |
| 326 glDeleteProgram(program); | 319 glDeleteProgram(program); |
| 327 } | 320 } |
| 328 | 321 |
| 329 } // namespace gpu | 322 } // namespace gpu |
| OLD | NEW |