| Index: ui/gl/gl_bindings_autogen_wgl.cc
|
| diff --git a/ui/gl/gl_bindings_autogen_wgl.cc b/ui/gl/gl_bindings_autogen_wgl.cc
|
| index a28aaf66f44623579d221ad5272dd8deb8049532..c5acf7128665b0967b7a02e9fba070aff4396660 100644
|
| --- a/ui/gl/gl_bindings_autogen_wgl.cc
|
| +++ b/ui/gl/gl_bindings_autogen_wgl.cc
|
| @@ -23,21 +23,61 @@ namespace gfx {
|
| static bool g_debugBindingsInitialized;
|
| DriverWGL g_driver_wgl;
|
|
|
| +BOOL wglChoosePixelFormatARBNotBound(HDC dc,
|
| + const int* int_attrib_list,
|
| + const float* float_attrib_list,
|
| + UINT max_formats,
|
| + int* formats,
|
| + UINT* num_formats) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +HPBUFFERARB wglCreatePbufferARBNotBound(HDC hDC,
|
| + int iPixelFormat,
|
| + int iWidth,
|
| + int iHeight,
|
| + const int* piAttribList) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +BOOL wglDestroyPbufferARBNotBound(HPBUFFERARB hPbuffer) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +HDC wglGetPbufferDCARBNotBound(HPBUFFERARB hPbuffer) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +BOOL wglQueryPbufferARBNotBound(HPBUFFERARB hPbuffer,
|
| + int iAttribute,
|
| + int* piValue) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +int wglReleasePbufferDCARBNotBound(HPBUFFERARB hPbuffer, HDC hDC) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +BOOL wglSwapIntervalEXTNotBound(int interval) {
|
| + NOTREACHED();
|
| + return 0;
|
| +}
|
| +
|
| void DriverWGL::InitializeStaticBindings() {
|
| fn.wglChoosePixelFormatARBFn = reinterpret_cast<wglChoosePixelFormatARBProc>(
|
| - GetGLProcAddress("wglChoosePixelFormatARB"));
|
| + wglChoosePixelFormatARBNotBound);
|
| fn.wglCopyContextFn =
|
| reinterpret_cast<wglCopyContextProc>(GetGLProcAddress("wglCopyContext"));
|
| fn.wglCreateContextFn = reinterpret_cast<wglCreateContextProc>(
|
| GetGLProcAddress("wglCreateContext"));
|
| fn.wglCreateLayerContextFn = reinterpret_cast<wglCreateLayerContextProc>(
|
| GetGLProcAddress("wglCreateLayerContext"));
|
| - fn.wglCreatePbufferARBFn = reinterpret_cast<wglCreatePbufferARBProc>(
|
| - GetGLProcAddress("wglCreatePbufferARB"));
|
| + fn.wglCreatePbufferARBFn =
|
| + reinterpret_cast<wglCreatePbufferARBProc>(wglCreatePbufferARBNotBound);
|
| fn.wglDeleteContextFn = reinterpret_cast<wglDeleteContextProc>(
|
| GetGLProcAddress("wglDeleteContext"));
|
| - fn.wglDestroyPbufferARBFn = reinterpret_cast<wglDestroyPbufferARBProc>(
|
| - GetGLProcAddress("wglDestroyPbufferARB"));
|
| + fn.wglDestroyPbufferARBFn =
|
| + reinterpret_cast<wglDestroyPbufferARBProc>(wglDestroyPbufferARBNotBound);
|
| fn.wglGetCurrentContextFn = reinterpret_cast<wglGetCurrentContextProc>(
|
| GetGLProcAddress("wglGetCurrentContext"));
|
| fn.wglGetCurrentDCFn = reinterpret_cast<wglGetCurrentDCProc>(
|
| @@ -48,27 +88,22 @@ void DriverWGL::InitializeStaticBindings() {
|
| fn.wglGetExtensionsStringEXTFn =
|
| reinterpret_cast<wglGetExtensionsStringEXTProc>(
|
| GetGLProcAddress("wglGetExtensionsStringEXT"));
|
| - fn.wglGetPbufferDCARBFn = reinterpret_cast<wglGetPbufferDCARBProc>(
|
| - GetGLProcAddress("wglGetPbufferDCARB"));
|
| + fn.wglGetPbufferDCARBFn =
|
| + reinterpret_cast<wglGetPbufferDCARBProc>(wglGetPbufferDCARBNotBound);
|
| fn.wglMakeCurrentFn =
|
| reinterpret_cast<wglMakeCurrentProc>(GetGLProcAddress("wglMakeCurrent"));
|
| - fn.wglQueryPbufferARBFn = reinterpret_cast<wglQueryPbufferARBProc>(
|
| - GetGLProcAddress("wglQueryPbufferARB"));
|
| + fn.wglQueryPbufferARBFn =
|
| + reinterpret_cast<wglQueryPbufferARBProc>(wglQueryPbufferARBNotBound);
|
| fn.wglReleasePbufferDCARBFn = reinterpret_cast<wglReleasePbufferDCARBProc>(
|
| - GetGLProcAddress("wglReleasePbufferDCARB"));
|
| + wglReleasePbufferDCARBNotBound);
|
| fn.wglShareListsFn =
|
| reinterpret_cast<wglShareListsProc>(GetGLProcAddress("wglShareLists"));
|
| - fn.wglSwapIntervalEXTFn = reinterpret_cast<wglSwapIntervalEXTProc>(
|
| - GetGLProcAddress("wglSwapIntervalEXT"));
|
| + fn.wglSwapIntervalEXTFn =
|
| + reinterpret_cast<wglSwapIntervalEXTProc>(wglSwapIntervalEXTNotBound);
|
| fn.wglSwapLayerBuffersFn = reinterpret_cast<wglSwapLayerBuffersProc>(
|
| GetGLProcAddress("wglSwapLayerBuffers"));
|
| -}
|
| -
|
| -void DriverWGL::InitializeDynamicBindings(GLContext* context) {
|
| - DCHECK(context && context->IsCurrent(NULL));
|
| - const GLVersionInfo* ver = context->GetVersionInfo();
|
| - ALLOW_UNUSED_LOCAL(ver);
|
| - std::string extensions = context->GetExtensions() + " ";
|
| + std::string extensions(GetPlatformExtensions());
|
| + extensions += " ";
|
| ALLOW_UNUSED_LOCAL(extensions);
|
|
|
| ext.b_WGL_ARB_extensions_string =
|
| @@ -82,6 +117,85 @@ void DriverWGL::InitializeDynamicBindings(GLContext* context) {
|
| ext.b_WGL_EXT_swap_control =
|
| extensions.find("WGL_EXT_swap_control ") != std::string::npos;
|
|
|
| + fn.wglChoosePixelFormatARBFn = 0;
|
| + debug_fn.wglChoosePixelFormatARBFn = 0;
|
| + if (ext.b_WGL_ARB_pixel_format) {
|
| + fn.wglChoosePixelFormatARBFn =
|
| + reinterpret_cast<wglChoosePixelFormatARBProc>(
|
| + GetGLProcAddress("wglChoosePixelFormatARB"));
|
| + } else {
|
| + fn.wglChoosePixelFormatARBFn =
|
| + reinterpret_cast<wglChoosePixelFormatARBProc>(
|
| + wglChoosePixelFormatARBNotBound);
|
| + }
|
| + DCHECK(fn.wglChoosePixelFormatARBFn);
|
| +
|
| + fn.wglCreatePbufferARBFn = 0;
|
| + debug_fn.wglCreatePbufferARBFn = 0;
|
| + if (ext.b_WGL_ARB_pbuffer) {
|
| + fn.wglCreatePbufferARBFn = reinterpret_cast<wglCreatePbufferARBProc>(
|
| + GetGLProcAddress("wglCreatePbufferARB"));
|
| + } else {
|
| + fn.wglCreatePbufferARBFn =
|
| + reinterpret_cast<wglCreatePbufferARBProc>(wglCreatePbufferARBNotBound);
|
| + }
|
| + DCHECK(fn.wglCreatePbufferARBFn);
|
| +
|
| + fn.wglDestroyPbufferARBFn = 0;
|
| + debug_fn.wglDestroyPbufferARBFn = 0;
|
| + if (ext.b_WGL_ARB_pbuffer) {
|
| + fn.wglDestroyPbufferARBFn = reinterpret_cast<wglDestroyPbufferARBProc>(
|
| + GetGLProcAddress("wglDestroyPbufferARB"));
|
| + } else {
|
| + fn.wglDestroyPbufferARBFn = reinterpret_cast<wglDestroyPbufferARBProc>(
|
| + wglDestroyPbufferARBNotBound);
|
| + }
|
| + DCHECK(fn.wglDestroyPbufferARBFn);
|
| +
|
| + fn.wglGetPbufferDCARBFn = 0;
|
| + debug_fn.wglGetPbufferDCARBFn = 0;
|
| + if (ext.b_WGL_ARB_pbuffer) {
|
| + fn.wglGetPbufferDCARBFn = reinterpret_cast<wglGetPbufferDCARBProc>(
|
| + GetGLProcAddress("wglGetPbufferDCARB"));
|
| + } else {
|
| + fn.wglGetPbufferDCARBFn =
|
| + reinterpret_cast<wglGetPbufferDCARBProc>(wglGetPbufferDCARBNotBound);
|
| + }
|
| + DCHECK(fn.wglGetPbufferDCARBFn);
|
| +
|
| + fn.wglQueryPbufferARBFn = 0;
|
| + debug_fn.wglQueryPbufferARBFn = 0;
|
| + if (ext.b_WGL_ARB_pbuffer) {
|
| + fn.wglQueryPbufferARBFn = reinterpret_cast<wglQueryPbufferARBProc>(
|
| + GetGLProcAddress("wglQueryPbufferARB"));
|
| + } else {
|
| + fn.wglQueryPbufferARBFn =
|
| + reinterpret_cast<wglQueryPbufferARBProc>(wglQueryPbufferARBNotBound);
|
| + }
|
| + DCHECK(fn.wglQueryPbufferARBFn);
|
| +
|
| + fn.wglReleasePbufferDCARBFn = 0;
|
| + debug_fn.wglReleasePbufferDCARBFn = 0;
|
| + if (ext.b_WGL_ARB_pbuffer) {
|
| + fn.wglReleasePbufferDCARBFn = reinterpret_cast<wglReleasePbufferDCARBProc>(
|
| + GetGLProcAddress("wglReleasePbufferDCARB"));
|
| + } else {
|
| + fn.wglReleasePbufferDCARBFn = reinterpret_cast<wglReleasePbufferDCARBProc>(
|
| + wglReleasePbufferDCARBNotBound);
|
| + }
|
| + DCHECK(fn.wglReleasePbufferDCARBFn);
|
| +
|
| + fn.wglSwapIntervalEXTFn = 0;
|
| + debug_fn.wglSwapIntervalEXTFn = 0;
|
| + if (ext.b_WGL_EXT_swap_control) {
|
| + fn.wglSwapIntervalEXTFn = reinterpret_cast<wglSwapIntervalEXTProc>(
|
| + GetGLProcAddress("wglSwapIntervalEXT"));
|
| + } else {
|
| + fn.wglSwapIntervalEXTFn =
|
| + reinterpret_cast<wglSwapIntervalEXTProc>(wglSwapIntervalEXTNotBound);
|
| + }
|
| + DCHECK(fn.wglSwapIntervalEXTFn);
|
| +
|
| if (g_debugBindingsInitialized)
|
| InitializeDebugBindings();
|
| }
|
|
|