| 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 // This file is auto-generated from | 5 // This file is auto-generated from |
| 6 // ui/gl/generate_bindings.py | 6 // ui/gl/generate_bindings.py |
| 7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
| 8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
| 9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
| 10 | 10 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 fn.glGetActiveUniformBlockNameFn = 0; | 182 fn.glGetActiveUniformBlockNameFn = 0; |
| 183 fn.glGetActiveUniformsivFn = 0; | 183 fn.glGetActiveUniformsivFn = 0; |
| 184 fn.glGetAttachedShadersFn = reinterpret_cast<glGetAttachedShadersProc>( | 184 fn.glGetAttachedShadersFn = reinterpret_cast<glGetAttachedShadersProc>( |
| 185 GetGLProcAddress("glGetAttachedShaders")); | 185 GetGLProcAddress("glGetAttachedShaders")); |
| 186 fn.glGetAttribLocationFn = reinterpret_cast<glGetAttribLocationProc>( | 186 fn.glGetAttribLocationFn = reinterpret_cast<glGetAttribLocationProc>( |
| 187 GetGLProcAddress("glGetAttribLocation")); | 187 GetGLProcAddress("glGetAttribLocation")); |
| 188 fn.glGetBooleanvFn = | 188 fn.glGetBooleanvFn = |
| 189 reinterpret_cast<glGetBooleanvProc>(GetGLProcAddress("glGetBooleanv")); | 189 reinterpret_cast<glGetBooleanvProc>(GetGLProcAddress("glGetBooleanv")); |
| 190 fn.glGetBufferParameterivFn = reinterpret_cast<glGetBufferParameterivProc>( | 190 fn.glGetBufferParameterivFn = reinterpret_cast<glGetBufferParameterivProc>( |
| 191 GetGLProcAddress("glGetBufferParameteriv")); | 191 GetGLProcAddress("glGetBufferParameteriv")); |
| 192 fn.glGetCompressedTexImageFn = 0; |
| 192 fn.glGetErrorFn = | 193 fn.glGetErrorFn = |
| 193 reinterpret_cast<glGetErrorProc>(GetGLProcAddress("glGetError")); | 194 reinterpret_cast<glGetErrorProc>(GetGLProcAddress("glGetError")); |
| 194 fn.glGetFenceivNVFn = 0; | 195 fn.glGetFenceivNVFn = 0; |
| 195 fn.glGetFloatvFn = | 196 fn.glGetFloatvFn = |
| 196 reinterpret_cast<glGetFloatvProc>(GetGLProcAddress("glGetFloatv")); | 197 reinterpret_cast<glGetFloatvProc>(GetGLProcAddress("glGetFloatv")); |
| 197 fn.glGetFragDataLocationFn = 0; | 198 fn.glGetFragDataLocationFn = 0; |
| 198 fn.glGetFramebufferAttachmentParameterivEXTFn = 0; | 199 fn.glGetFramebufferAttachmentParameterivEXTFn = 0; |
| 199 fn.glGetGraphicsResetStatusARBFn = 0; | 200 fn.glGetGraphicsResetStatusARBFn = 0; |
| 200 fn.glGetInteger64i_vFn = 0; | 201 fn.glGetInteger64i_vFn = 0; |
| 201 fn.glGetInteger64vFn = 0; | 202 fn.glGetInteger64vFn = 0; |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 DCHECK(fn.glGetActiveUniformBlockNameFn); | 1161 DCHECK(fn.glGetActiveUniformBlockNameFn); |
| 1161 } | 1162 } |
| 1162 | 1163 |
| 1163 debug_fn.glGetActiveUniformsivFn = 0; | 1164 debug_fn.glGetActiveUniformsivFn = 0; |
| 1164 if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) { | 1165 if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) { |
| 1165 fn.glGetActiveUniformsivFn = reinterpret_cast<glGetActiveUniformsivProc>( | 1166 fn.glGetActiveUniformsivFn = reinterpret_cast<glGetActiveUniformsivProc>( |
| 1166 GetGLProcAddress("glGetActiveUniformsiv")); | 1167 GetGLProcAddress("glGetActiveUniformsiv")); |
| 1167 DCHECK(fn.glGetActiveUniformsivFn); | 1168 DCHECK(fn.glGetActiveUniformsivFn); |
| 1168 } | 1169 } |
| 1169 | 1170 |
| 1171 debug_fn.glGetCompressedTexImageFn = 0; |
| 1172 if (!ver->is_es) { |
| 1173 fn.glGetCompressedTexImageFn = |
| 1174 reinterpret_cast<glGetCompressedTexImageProc>( |
| 1175 GetGLProcAddress("glGetCompressedTexImage")); |
| 1176 DCHECK(fn.glGetCompressedTexImageFn); |
| 1177 } |
| 1178 |
| 1170 debug_fn.glGetFenceivNVFn = 0; | 1179 debug_fn.glGetFenceivNVFn = 0; |
| 1171 if (ext.b_GL_NV_fence) { | 1180 if (ext.b_GL_NV_fence) { |
| 1172 fn.glGetFenceivNVFn = reinterpret_cast<glGetFenceivNVProc>( | 1181 fn.glGetFenceivNVFn = reinterpret_cast<glGetFenceivNVProc>( |
| 1173 GetGLProcAddress("glGetFenceivNV")); | 1182 GetGLProcAddress("glGetFenceivNV")); |
| 1174 DCHECK(fn.glGetFenceivNVFn); | 1183 DCHECK(fn.glGetFenceivNVFn); |
| 1175 } | 1184 } |
| 1176 | 1185 |
| 1177 debug_fn.glGetFragDataLocationFn = 0; | 1186 debug_fn.glGetFragDataLocationFn = 0; |
| 1178 if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) { | 1187 if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) { |
| 1179 fn.glGetFragDataLocationFn = reinterpret_cast<glGetFragDataLocationProc>( | 1188 fn.glGetFragDataLocationFn = reinterpret_cast<glGetFragDataLocationProc>( |
| (...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3059 | 3068 |
| 3060 static void GL_BINDING_CALL | 3069 static void GL_BINDING_CALL |
| 3061 Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { | 3070 Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { |
| 3062 GL_SERVICE_LOG("glGetBufferParameteriv" | 3071 GL_SERVICE_LOG("glGetBufferParameteriv" |
| 3063 << "(" << GLEnums::GetStringEnum(target) << ", " | 3072 << "(" << GLEnums::GetStringEnum(target) << ", " |
| 3064 << GLEnums::GetStringEnum(pname) << ", " | 3073 << GLEnums::GetStringEnum(pname) << ", " |
| 3065 << static_cast<const void*>(params) << ")"); | 3074 << static_cast<const void*>(params) << ")"); |
| 3066 g_driver_gl.debug_fn.glGetBufferParameterivFn(target, pname, params); | 3075 g_driver_gl.debug_fn.glGetBufferParameterivFn(target, pname, params); |
| 3067 } | 3076 } |
| 3068 | 3077 |
| 3078 static void GL_BINDING_CALL |
| 3079 Debug_glGetCompressedTexImage(GLenum target, GLint lod, GLvoid* img) { |
| 3080 GL_SERVICE_LOG("glGetCompressedTexImage" |
| 3081 << "(" << GLEnums::GetStringEnum(target) << ", " << lod << ", " |
| 3082 << static_cast<const void*>(img) << ")"); |
| 3083 g_driver_gl.debug_fn.glGetCompressedTexImageFn(target, lod, img); |
| 3084 } |
| 3085 |
| 3069 static GLenum GL_BINDING_CALL Debug_glGetError(void) { | 3086 static GLenum GL_BINDING_CALL Debug_glGetError(void) { |
| 3070 GL_SERVICE_LOG("glGetError" | 3087 GL_SERVICE_LOG("glGetError" |
| 3071 << "(" | 3088 << "(" |
| 3072 << ")"); | 3089 << ")"); |
| 3073 GLenum result = g_driver_gl.debug_fn.glGetErrorFn(); | 3090 GLenum result = g_driver_gl.debug_fn.glGetErrorFn(); |
| 3074 | 3091 |
| 3075 GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringError(result)); | 3092 GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringError(result)); |
| 3076 | 3093 |
| 3077 return result; | 3094 return result; |
| 3078 } | 3095 } |
| (...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5109 fn.glGetAttribLocationFn = Debug_glGetAttribLocation; | 5126 fn.glGetAttribLocationFn = Debug_glGetAttribLocation; |
| 5110 } | 5127 } |
| 5111 if (!debug_fn.glGetBooleanvFn) { | 5128 if (!debug_fn.glGetBooleanvFn) { |
| 5112 debug_fn.glGetBooleanvFn = fn.glGetBooleanvFn; | 5129 debug_fn.glGetBooleanvFn = fn.glGetBooleanvFn; |
| 5113 fn.glGetBooleanvFn = Debug_glGetBooleanv; | 5130 fn.glGetBooleanvFn = Debug_glGetBooleanv; |
| 5114 } | 5131 } |
| 5115 if (!debug_fn.glGetBufferParameterivFn) { | 5132 if (!debug_fn.glGetBufferParameterivFn) { |
| 5116 debug_fn.glGetBufferParameterivFn = fn.glGetBufferParameterivFn; | 5133 debug_fn.glGetBufferParameterivFn = fn.glGetBufferParameterivFn; |
| 5117 fn.glGetBufferParameterivFn = Debug_glGetBufferParameteriv; | 5134 fn.glGetBufferParameterivFn = Debug_glGetBufferParameteriv; |
| 5118 } | 5135 } |
| 5136 if (!debug_fn.glGetCompressedTexImageFn) { |
| 5137 debug_fn.glGetCompressedTexImageFn = fn.glGetCompressedTexImageFn; |
| 5138 fn.glGetCompressedTexImageFn = Debug_glGetCompressedTexImage; |
| 5139 } |
| 5119 if (!debug_fn.glGetErrorFn) { | 5140 if (!debug_fn.glGetErrorFn) { |
| 5120 debug_fn.glGetErrorFn = fn.glGetErrorFn; | 5141 debug_fn.glGetErrorFn = fn.glGetErrorFn; |
| 5121 fn.glGetErrorFn = Debug_glGetError; | 5142 fn.glGetErrorFn = Debug_glGetError; |
| 5122 } | 5143 } |
| 5123 if (!debug_fn.glGetFenceivNVFn) { | 5144 if (!debug_fn.glGetFenceivNVFn) { |
| 5124 debug_fn.glGetFenceivNVFn = fn.glGetFenceivNVFn; | 5145 debug_fn.glGetFenceivNVFn = fn.glGetFenceivNVFn; |
| 5125 fn.glGetFenceivNVFn = Debug_glGetFenceivNV; | 5146 fn.glGetFenceivNVFn = Debug_glGetFenceivNV; |
| 5126 } | 5147 } |
| 5127 if (!debug_fn.glGetFloatvFn) { | 5148 if (!debug_fn.glGetFloatvFn) { |
| 5128 debug_fn.glGetFloatvFn = fn.glGetFloatvFn; | 5149 debug_fn.glGetFloatvFn = fn.glGetFloatvFn; |
| (...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6477 void GLApiBase::glGetBooleanvFn(GLenum pname, GLboolean* params) { | 6498 void GLApiBase::glGetBooleanvFn(GLenum pname, GLboolean* params) { |
| 6478 driver_->fn.glGetBooleanvFn(pname, params); | 6499 driver_->fn.glGetBooleanvFn(pname, params); |
| 6479 } | 6500 } |
| 6480 | 6501 |
| 6481 void GLApiBase::glGetBufferParameterivFn(GLenum target, | 6502 void GLApiBase::glGetBufferParameterivFn(GLenum target, |
| 6482 GLenum pname, | 6503 GLenum pname, |
| 6483 GLint* params) { | 6504 GLint* params) { |
| 6484 driver_->fn.glGetBufferParameterivFn(target, pname, params); | 6505 driver_->fn.glGetBufferParameterivFn(target, pname, params); |
| 6485 } | 6506 } |
| 6486 | 6507 |
| 6508 void GLApiBase::glGetCompressedTexImageFn(GLenum target, |
| 6509 GLint lod, |
| 6510 GLvoid* img) { |
| 6511 driver_->fn.glGetCompressedTexImageFn(target, lod, img); |
| 6512 } |
| 6513 |
| 6487 GLenum GLApiBase::glGetErrorFn(void) { | 6514 GLenum GLApiBase::glGetErrorFn(void) { |
| 6488 return driver_->fn.glGetErrorFn(); | 6515 return driver_->fn.glGetErrorFn(); |
| 6489 } | 6516 } |
| 6490 | 6517 |
| 6491 void GLApiBase::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) { | 6518 void GLApiBase::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) { |
| 6492 driver_->fn.glGetFenceivNVFn(fence, pname, params); | 6519 driver_->fn.glGetFenceivNVFn(fence, pname, params); |
| 6493 } | 6520 } |
| 6494 | 6521 |
| 6495 void GLApiBase::glGetFloatvFn(GLenum pname, GLfloat* params) { | 6522 void GLApiBase::glGetFloatvFn(GLenum pname, GLfloat* params) { |
| 6496 driver_->fn.glGetFloatvFn(pname, params); | 6523 driver_->fn.glGetFloatvFn(pname, params); |
| (...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8233 gl_api_->glGetBooleanvFn(pname, params); | 8260 gl_api_->glGetBooleanvFn(pname, params); |
| 8234 } | 8261 } |
| 8235 | 8262 |
| 8236 void TraceGLApi::glGetBufferParameterivFn(GLenum target, | 8263 void TraceGLApi::glGetBufferParameterivFn(GLenum target, |
| 8237 GLenum pname, | 8264 GLenum pname, |
| 8238 GLint* params) { | 8265 GLint* params) { |
| 8239 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBufferParameteriv") | 8266 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBufferParameteriv") |
| 8240 gl_api_->glGetBufferParameterivFn(target, pname, params); | 8267 gl_api_->glGetBufferParameterivFn(target, pname, params); |
| 8241 } | 8268 } |
| 8242 | 8269 |
| 8270 void TraceGLApi::glGetCompressedTexImageFn(GLenum target, |
| 8271 GLint lod, |
| 8272 GLvoid* img) { |
| 8273 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetCompressedTexImage") |
| 8274 gl_api_->glGetCompressedTexImageFn(target, lod, img); |
| 8275 } |
| 8276 |
| 8243 GLenum TraceGLApi::glGetErrorFn(void) { | 8277 GLenum TraceGLApi::glGetErrorFn(void) { |
| 8244 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetError") | 8278 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetError") |
| 8245 return gl_api_->glGetErrorFn(); | 8279 return gl_api_->glGetErrorFn(); |
| 8246 } | 8280 } |
| 8247 | 8281 |
| 8248 void TraceGLApi::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) { | 8282 void TraceGLApi::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) { |
| 8249 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFenceivNV") | 8283 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFenceivNV") |
| 8250 gl_api_->glGetFenceivNVFn(fence, pname, params); | 8284 gl_api_->glGetFenceivNVFn(fence, pname, params); |
| 8251 } | 8285 } |
| 8252 | 8286 |
| (...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10268 | 10302 |
| 10269 void NoContextGLApi::glGetBufferParameterivFn(GLenum target, | 10303 void NoContextGLApi::glGetBufferParameterivFn(GLenum target, |
| 10270 GLenum pname, | 10304 GLenum pname, |
| 10271 GLint* params) { | 10305 GLint* params) { |
| 10272 NOTREACHED() | 10306 NOTREACHED() |
| 10273 << "Trying to call glGetBufferParameteriv() without current GL context"; | 10307 << "Trying to call glGetBufferParameteriv() without current GL context"; |
| 10274 LOG(ERROR) | 10308 LOG(ERROR) |
| 10275 << "Trying to call glGetBufferParameteriv() without current GL context"; | 10309 << "Trying to call glGetBufferParameteriv() without current GL context"; |
| 10276 } | 10310 } |
| 10277 | 10311 |
| 10312 void NoContextGLApi::glGetCompressedTexImageFn(GLenum target, |
| 10313 GLint lod, |
| 10314 GLvoid* img) { |
| 10315 NOTREACHED() |
| 10316 << "Trying to call glGetCompressedTexImage() without current GL context"; |
| 10317 LOG(ERROR) |
| 10318 << "Trying to call glGetCompressedTexImage() without current GL context"; |
| 10319 } |
| 10320 |
| 10278 GLenum NoContextGLApi::glGetErrorFn(void) { | 10321 GLenum NoContextGLApi::glGetErrorFn(void) { |
| 10279 NOTREACHED() << "Trying to call glGetError() without current GL context"; | 10322 NOTREACHED() << "Trying to call glGetError() without current GL context"; |
| 10280 LOG(ERROR) << "Trying to call glGetError() without current GL context"; | 10323 LOG(ERROR) << "Trying to call glGetError() without current GL context"; |
| 10281 return static_cast<GLenum>(0); | 10324 return static_cast<GLenum>(0); |
| 10282 } | 10325 } |
| 10283 | 10326 |
| 10284 void NoContextGLApi::glGetFenceivNVFn(GLuint fence, | 10327 void NoContextGLApi::glGetFenceivNVFn(GLuint fence, |
| 10285 GLenum pname, | 10328 GLenum pname, |
| 10286 GLint* params) { | 10329 GLint* params) { |
| 10287 NOTREACHED() << "Trying to call glGetFenceivNV() without current GL context"; | 10330 NOTREACHED() << "Trying to call glGetFenceivNV() without current GL context"; |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11605 | 11648 |
| 11606 GLenum NoContextGLApi::glWaitSyncFn(GLsync sync, | 11649 GLenum NoContextGLApi::glWaitSyncFn(GLsync sync, |
| 11607 GLbitfield flags, | 11650 GLbitfield flags, |
| 11608 GLuint64 timeout) { | 11651 GLuint64 timeout) { |
| 11609 NOTREACHED() << "Trying to call glWaitSync() without current GL context"; | 11652 NOTREACHED() << "Trying to call glWaitSync() without current GL context"; |
| 11610 LOG(ERROR) << "Trying to call glWaitSync() without current GL context"; | 11653 LOG(ERROR) << "Trying to call glWaitSync() without current GL context"; |
| 11611 return static_cast<GLenum>(0); | 11654 return static_cast<GLenum>(0); |
| 11612 } | 11655 } |
| 11613 | 11656 |
| 11614 } // namespace gfx | 11657 } // namespace gfx |
| OLD | NEW |