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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 fn.glPathParameterfNVFn = 0; | 304 fn.glPathParameterfNVFn = 0; |
305 fn.glPathParameteriNVFn = 0; | 305 fn.glPathParameteriNVFn = 0; |
306 fn.glPathStencilFuncNVFn = 0; | 306 fn.glPathStencilFuncNVFn = 0; |
307 fn.glPauseTransformFeedbackFn = 0; | 307 fn.glPauseTransformFeedbackFn = 0; |
308 fn.glPixelStoreiFn = | 308 fn.glPixelStoreiFn = |
309 reinterpret_cast<glPixelStoreiProc>(GetGLProcAddress("glPixelStorei")); | 309 reinterpret_cast<glPixelStoreiProc>(GetGLProcAddress("glPixelStorei")); |
310 fn.glPointParameteriFn = 0; | 310 fn.glPointParameteriFn = 0; |
311 fn.glPolygonOffsetFn = reinterpret_cast<glPolygonOffsetProc>( | 311 fn.glPolygonOffsetFn = reinterpret_cast<glPolygonOffsetProc>( |
312 GetGLProcAddress("glPolygonOffset")); | 312 GetGLProcAddress("glPolygonOffset")); |
313 fn.glPopGroupMarkerEXTFn = 0; | 313 fn.glPopGroupMarkerEXTFn = 0; |
| 314 fn.glPrimitiveRestartIndexFn = 0; |
314 fn.glProgramBinaryFn = 0; | 315 fn.glProgramBinaryFn = 0; |
315 fn.glProgramParameteriFn = 0; | 316 fn.glProgramParameteriFn = 0; |
316 fn.glProgramPathFragmentInputGenNVFn = 0; | 317 fn.glProgramPathFragmentInputGenNVFn = 0; |
317 fn.glPushGroupMarkerEXTFn = 0; | 318 fn.glPushGroupMarkerEXTFn = 0; |
318 fn.glQueryCounterFn = 0; | 319 fn.glQueryCounterFn = 0; |
319 fn.glReadBufferFn = 0; | 320 fn.glReadBufferFn = 0; |
320 fn.glReadPixelsFn = | 321 fn.glReadPixelsFn = |
321 reinterpret_cast<glReadPixelsProc>(GetGLProcAddress("glReadPixels")); | 322 reinterpret_cast<glReadPixelsProc>(GetGLProcAddress("glReadPixels")); |
322 fn.glReleaseShaderCompilerFn = 0; | 323 fn.glReleaseShaderCompilerFn = 0; |
323 fn.glRenderbufferStorageEXTFn = 0; | 324 fn.glRenderbufferStorageEXTFn = 0; |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 fn.glPointParameteriFn = reinterpret_cast<glPointParameteriProc>( | 1628 fn.glPointParameteriFn = reinterpret_cast<glPointParameteriProc>( |
1628 GetGLProcAddress("glPointParameteri")); | 1629 GetGLProcAddress("glPointParameteri")); |
1629 } | 1630 } |
1630 | 1631 |
1631 debug_fn.glPopGroupMarkerEXTFn = 0; | 1632 debug_fn.glPopGroupMarkerEXTFn = 0; |
1632 if (ext.b_GL_EXT_debug_marker) { | 1633 if (ext.b_GL_EXT_debug_marker) { |
1633 fn.glPopGroupMarkerEXTFn = reinterpret_cast<glPopGroupMarkerEXTProc>( | 1634 fn.glPopGroupMarkerEXTFn = reinterpret_cast<glPopGroupMarkerEXTProc>( |
1634 GetGLProcAddress("glPopGroupMarkerEXT")); | 1635 GetGLProcAddress("glPopGroupMarkerEXT")); |
1635 } | 1636 } |
1636 | 1637 |
| 1638 debug_fn.glPrimitiveRestartIndexFn = 0; |
| 1639 if (ver->IsAtLeastGL(3u, 1u)) { |
| 1640 fn.glPrimitiveRestartIndexFn = |
| 1641 reinterpret_cast<glPrimitiveRestartIndexProc>( |
| 1642 GetGLProcAddress("glPrimitiveRestartIndex")); |
| 1643 } |
| 1644 |
1637 debug_fn.glProgramBinaryFn = 0; | 1645 debug_fn.glProgramBinaryFn = 0; |
1638 if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 0u) || | 1646 if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 0u) || |
1639 ext.b_GL_ARB_get_program_binary) { | 1647 ext.b_GL_ARB_get_program_binary) { |
1640 fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>( | 1648 fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>( |
1641 GetGLProcAddress("glProgramBinary")); | 1649 GetGLProcAddress("glProgramBinary")); |
1642 } else if (ext.b_GL_OES_get_program_binary) { | 1650 } else if (ext.b_GL_OES_get_program_binary) { |
1643 fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>( | 1651 fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>( |
1644 GetGLProcAddress("glProgramBinaryOES")); | 1652 GetGLProcAddress("glProgramBinaryOES")); |
1645 } | 1653 } |
1646 | 1654 |
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4266 } | 4274 } |
4267 | 4275 |
4268 static void GL_BINDING_CALL Debug_glPopGroupMarkerEXT(void) { | 4276 static void GL_BINDING_CALL Debug_glPopGroupMarkerEXT(void) { |
4269 GL_SERVICE_LOG("glPopGroupMarkerEXT" | 4277 GL_SERVICE_LOG("glPopGroupMarkerEXT" |
4270 << "(" | 4278 << "(" |
4271 << ")"); | 4279 << ")"); |
4272 DCHECK(g_driver_gl.debug_fn.glPopGroupMarkerEXTFn != nullptr); | 4280 DCHECK(g_driver_gl.debug_fn.glPopGroupMarkerEXTFn != nullptr); |
4273 g_driver_gl.debug_fn.glPopGroupMarkerEXTFn(); | 4281 g_driver_gl.debug_fn.glPopGroupMarkerEXTFn(); |
4274 } | 4282 } |
4275 | 4283 |
| 4284 static void GL_BINDING_CALL Debug_glPrimitiveRestartIndex(GLuint index) { |
| 4285 GL_SERVICE_LOG("glPrimitiveRestartIndex" |
| 4286 << "(" << index << ")"); |
| 4287 DCHECK(g_driver_gl.debug_fn.glPrimitiveRestartIndexFn != nullptr); |
| 4288 g_driver_gl.debug_fn.glPrimitiveRestartIndexFn(index); |
| 4289 } |
| 4290 |
4276 static void GL_BINDING_CALL Debug_glProgramBinary(GLuint program, | 4291 static void GL_BINDING_CALL Debug_glProgramBinary(GLuint program, |
4277 GLenum binaryFormat, | 4292 GLenum binaryFormat, |
4278 const GLvoid* binary, | 4293 const GLvoid* binary, |
4279 GLsizei length) { | 4294 GLsizei length) { |
4280 GL_SERVICE_LOG("glProgramBinary" | 4295 GL_SERVICE_LOG("glProgramBinary" |
4281 << "(" << program << ", " | 4296 << "(" << program << ", " |
4282 << GLEnums::GetStringEnum(binaryFormat) << ", " | 4297 << GLEnums::GetStringEnum(binaryFormat) << ", " |
4283 << static_cast<const void*>(binary) << ", " << length << ")"); | 4298 << static_cast<const void*>(binary) << ", " << length << ")"); |
4284 DCHECK(g_driver_gl.debug_fn.glProgramBinaryFn != nullptr); | 4299 DCHECK(g_driver_gl.debug_fn.glProgramBinaryFn != nullptr); |
4285 g_driver_gl.debug_fn.glProgramBinaryFn(program, binaryFormat, binary, length); | 4300 g_driver_gl.debug_fn.glProgramBinaryFn(program, binaryFormat, binary, length); |
(...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6342 fn.glPointParameteriFn = Debug_glPointParameteri; | 6357 fn.glPointParameteriFn = Debug_glPointParameteri; |
6343 } | 6358 } |
6344 if (!debug_fn.glPolygonOffsetFn) { | 6359 if (!debug_fn.glPolygonOffsetFn) { |
6345 debug_fn.glPolygonOffsetFn = fn.glPolygonOffsetFn; | 6360 debug_fn.glPolygonOffsetFn = fn.glPolygonOffsetFn; |
6346 fn.glPolygonOffsetFn = Debug_glPolygonOffset; | 6361 fn.glPolygonOffsetFn = Debug_glPolygonOffset; |
6347 } | 6362 } |
6348 if (!debug_fn.glPopGroupMarkerEXTFn) { | 6363 if (!debug_fn.glPopGroupMarkerEXTFn) { |
6349 debug_fn.glPopGroupMarkerEXTFn = fn.glPopGroupMarkerEXTFn; | 6364 debug_fn.glPopGroupMarkerEXTFn = fn.glPopGroupMarkerEXTFn; |
6350 fn.glPopGroupMarkerEXTFn = Debug_glPopGroupMarkerEXT; | 6365 fn.glPopGroupMarkerEXTFn = Debug_glPopGroupMarkerEXT; |
6351 } | 6366 } |
| 6367 if (!debug_fn.glPrimitiveRestartIndexFn) { |
| 6368 debug_fn.glPrimitiveRestartIndexFn = fn.glPrimitiveRestartIndexFn; |
| 6369 fn.glPrimitiveRestartIndexFn = Debug_glPrimitiveRestartIndex; |
| 6370 } |
6352 if (!debug_fn.glProgramBinaryFn) { | 6371 if (!debug_fn.glProgramBinaryFn) { |
6353 debug_fn.glProgramBinaryFn = fn.glProgramBinaryFn; | 6372 debug_fn.glProgramBinaryFn = fn.glProgramBinaryFn; |
6354 fn.glProgramBinaryFn = Debug_glProgramBinary; | 6373 fn.glProgramBinaryFn = Debug_glProgramBinary; |
6355 } | 6374 } |
6356 if (!debug_fn.glProgramParameteriFn) { | 6375 if (!debug_fn.glProgramParameteriFn) { |
6357 debug_fn.glProgramParameteriFn = fn.glProgramParameteriFn; | 6376 debug_fn.glProgramParameteriFn = fn.glProgramParameteriFn; |
6358 fn.glProgramParameteriFn = Debug_glProgramParameteri; | 6377 fn.glProgramParameteriFn = Debug_glProgramParameteri; |
6359 } | 6378 } |
6360 if (!debug_fn.glProgramPathFragmentInputGenNVFn) { | 6379 if (!debug_fn.glProgramPathFragmentInputGenNVFn) { |
6361 debug_fn.glProgramPathFragmentInputGenNVFn = | 6380 debug_fn.glProgramPathFragmentInputGenNVFn = |
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7991 } | 8010 } |
7992 | 8011 |
7993 void GLApiBase::glPolygonOffsetFn(GLfloat factor, GLfloat units) { | 8012 void GLApiBase::glPolygonOffsetFn(GLfloat factor, GLfloat units) { |
7994 driver_->fn.glPolygonOffsetFn(factor, units); | 8013 driver_->fn.glPolygonOffsetFn(factor, units); |
7995 } | 8014 } |
7996 | 8015 |
7997 void GLApiBase::glPopGroupMarkerEXTFn(void) { | 8016 void GLApiBase::glPopGroupMarkerEXTFn(void) { |
7998 driver_->fn.glPopGroupMarkerEXTFn(); | 8017 driver_->fn.glPopGroupMarkerEXTFn(); |
7999 } | 8018 } |
8000 | 8019 |
| 8020 void GLApiBase::glPrimitiveRestartIndexFn(GLuint index) { |
| 8021 driver_->fn.glPrimitiveRestartIndexFn(index); |
| 8022 } |
| 8023 |
8001 void GLApiBase::glProgramBinaryFn(GLuint program, | 8024 void GLApiBase::glProgramBinaryFn(GLuint program, |
8002 GLenum binaryFormat, | 8025 GLenum binaryFormat, |
8003 const GLvoid* binary, | 8026 const GLvoid* binary, |
8004 GLsizei length) { | 8027 GLsizei length) { |
8005 driver_->fn.glProgramBinaryFn(program, binaryFormat, binary, length); | 8028 driver_->fn.glProgramBinaryFn(program, binaryFormat, binary, length); |
8006 } | 8029 } |
8007 | 8030 |
8008 void GLApiBase::glProgramParameteriFn(GLuint program, | 8031 void GLApiBase::glProgramParameteriFn(GLuint program, |
8009 GLenum pname, | 8032 GLenum pname, |
8010 GLint value) { | 8033 GLint value) { |
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10104 void TraceGLApi::glPolygonOffsetFn(GLfloat factor, GLfloat units) { | 10127 void TraceGLApi::glPolygonOffsetFn(GLfloat factor, GLfloat units) { |
10105 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonOffset") | 10128 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonOffset") |
10106 gl_api_->glPolygonOffsetFn(factor, units); | 10129 gl_api_->glPolygonOffsetFn(factor, units); |
10107 } | 10130 } |
10108 | 10131 |
10109 void TraceGLApi::glPopGroupMarkerEXTFn(void) { | 10132 void TraceGLApi::glPopGroupMarkerEXTFn(void) { |
10110 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopGroupMarkerEXT") | 10133 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopGroupMarkerEXT") |
10111 gl_api_->glPopGroupMarkerEXTFn(); | 10134 gl_api_->glPopGroupMarkerEXTFn(); |
10112 } | 10135 } |
10113 | 10136 |
| 10137 void TraceGLApi::glPrimitiveRestartIndexFn(GLuint index) { |
| 10138 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPrimitiveRestartIndex") |
| 10139 gl_api_->glPrimitiveRestartIndexFn(index); |
| 10140 } |
| 10141 |
10114 void TraceGLApi::glProgramBinaryFn(GLuint program, | 10142 void TraceGLApi::glProgramBinaryFn(GLuint program, |
10115 GLenum binaryFormat, | 10143 GLenum binaryFormat, |
10116 const GLvoid* binary, | 10144 const GLvoid* binary, |
10117 GLsizei length) { | 10145 GLsizei length) { |
10118 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramBinary") | 10146 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramBinary") |
10119 gl_api_->glProgramBinaryFn(program, binaryFormat, binary, length); | 10147 gl_api_->glProgramBinaryFn(program, binaryFormat, binary, length); |
10120 } | 10148 } |
10121 | 10149 |
10122 void TraceGLApi::glProgramParameteriFn(GLuint program, | 10150 void TraceGLApi::glProgramParameteriFn(GLuint program, |
10123 GLenum pname, | 10151 GLenum pname, |
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12569 LOG(ERROR) << "Trying to call glPolygonOffset() without current GL context"; | 12597 LOG(ERROR) << "Trying to call glPolygonOffset() without current GL context"; |
12570 } | 12598 } |
12571 | 12599 |
12572 void NoContextGLApi::glPopGroupMarkerEXTFn(void) { | 12600 void NoContextGLApi::glPopGroupMarkerEXTFn(void) { |
12573 NOTREACHED() | 12601 NOTREACHED() |
12574 << "Trying to call glPopGroupMarkerEXT() without current GL context"; | 12602 << "Trying to call glPopGroupMarkerEXT() without current GL context"; |
12575 LOG(ERROR) | 12603 LOG(ERROR) |
12576 << "Trying to call glPopGroupMarkerEXT() without current GL context"; | 12604 << "Trying to call glPopGroupMarkerEXT() without current GL context"; |
12577 } | 12605 } |
12578 | 12606 |
| 12607 void NoContextGLApi::glPrimitiveRestartIndexFn(GLuint index) { |
| 12608 NOTREACHED() |
| 12609 << "Trying to call glPrimitiveRestartIndex() without current GL context"; |
| 12610 LOG(ERROR) |
| 12611 << "Trying to call glPrimitiveRestartIndex() without current GL context"; |
| 12612 } |
| 12613 |
12579 void NoContextGLApi::glProgramBinaryFn(GLuint program, | 12614 void NoContextGLApi::glProgramBinaryFn(GLuint program, |
12580 GLenum binaryFormat, | 12615 GLenum binaryFormat, |
12581 const GLvoid* binary, | 12616 const GLvoid* binary, |
12582 GLsizei length) { | 12617 GLsizei length) { |
12583 NOTREACHED() << "Trying to call glProgramBinary() without current GL context"; | 12618 NOTREACHED() << "Trying to call glProgramBinary() without current GL context"; |
12584 LOG(ERROR) << "Trying to call glProgramBinary() without current GL context"; | 12619 LOG(ERROR) << "Trying to call glProgramBinary() without current GL context"; |
12585 } | 12620 } |
12586 | 12621 |
12587 void NoContextGLApi::glProgramParameteriFn(GLuint program, | 12622 void NoContextGLApi::glProgramParameteriFn(GLuint program, |
12588 GLenum pname, | 12623 GLenum pname, |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13460 | 13495 |
13461 GLenum NoContextGLApi::glWaitSyncFn(GLsync sync, | 13496 GLenum NoContextGLApi::glWaitSyncFn(GLsync sync, |
13462 GLbitfield flags, | 13497 GLbitfield flags, |
13463 GLuint64 timeout) { | 13498 GLuint64 timeout) { |
13464 NOTREACHED() << "Trying to call glWaitSync() without current GL context"; | 13499 NOTREACHED() << "Trying to call glWaitSync() without current GL context"; |
13465 LOG(ERROR) << "Trying to call glWaitSync() without current GL context"; | 13500 LOG(ERROR) << "Trying to call glWaitSync() without current GL context"; |
13466 return static_cast<GLenum>(0); | 13501 return static_cast<GLenum>(0); |
13467 } | 13502 } |
13468 | 13503 |
13469 } // namespace gfx | 13504 } // namespace gfx |
OLD | NEW |