| 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 98a7d13f364df566a9b4e29898e6e7516002ad6f..d0935a9084da49754df8ac37efe915bc6ebab62b 100644
|
| --- a/ui/gl/gl_bindings_autogen_wgl.cc
|
| +++ b/ui/gl/gl_bindings_autogen_wgl.cc
|
| @@ -29,6 +29,7 @@ void DriverWGL::InitializeStaticBindings() {
|
| reinterpret_cast<wglCopyContextProc>(GetGLProcAddress("wglCopyContext"));
|
| fn.wglCreateContextFn = reinterpret_cast<wglCreateContextProc>(
|
| GetGLProcAddress("wglCreateContext"));
|
| + fn.wglCreateContextAttribsARBFn = 0;
|
| fn.wglCreateLayerContextFn = reinterpret_cast<wglCreateLayerContextProc>(
|
| GetGLProcAddress("wglCreateLayerContext"));
|
| fn.wglCreatePbufferARBFn = 0;
|
| @@ -62,6 +63,8 @@ void DriverWGL::InitializeExtensionBindings() {
|
| extensions += " ";
|
| ALLOW_UNUSED_LOCAL(extensions);
|
|
|
| + ext.b_WGL_ARB_create_context =
|
| + extensions.find("WGL_ARB_create_context ") != std::string::npos;
|
| ext.b_WGL_ARB_extensions_string =
|
| extensions.find("WGL_ARB_extensions_string ") != std::string::npos;
|
| ext.b_WGL_ARB_pbuffer =
|
| @@ -80,6 +83,13 @@ void DriverWGL::InitializeExtensionBindings() {
|
| GetGLProcAddress("wglChoosePixelFormatARB"));
|
| }
|
|
|
| + debug_fn.wglCreateContextAttribsARBFn = 0;
|
| + if (ext.b_WGL_ARB_create_context) {
|
| + fn.wglCreateContextAttribsARBFn =
|
| + reinterpret_cast<wglCreateContextAttribsARBProc>(
|
| + GetGLProcAddress("wglCreateContextAttribsARB"));
|
| + }
|
| +
|
| debug_fn.wglCreatePbufferARBFn = 0;
|
| if (ext.b_WGL_ARB_pbuffer) {
|
| fn.wglCreatePbufferARBFn = reinterpret_cast<wglCreatePbufferARBProc>(
|
| @@ -164,6 +174,20 @@ static HGLRC GL_BINDING_CALL Debug_wglCreateContext(HDC hdc) {
|
| return result;
|
| }
|
|
|
| +static HGLRC GL_BINDING_CALL
|
| +Debug_wglCreateContextAttribsARB(HDC hDC,
|
| + HGLRC hShareContext,
|
| + const int* attribList) {
|
| + GL_SERVICE_LOG("wglCreateContextAttribsARB"
|
| + << "(" << hDC << ", " << hShareContext << ", "
|
| + << static_cast<const void*>(attribList) << ")");
|
| + DCHECK(g_driver_wgl.debug_fn.wglCreateContextAttribsARBFn != nullptr);
|
| + HGLRC result = g_driver_wgl.debug_fn.wglCreateContextAttribsARBFn(
|
| + hDC, hShareContext, attribList);
|
| + GL_SERVICE_LOG("GL_RESULT: " << result);
|
| + return result;
|
| +}
|
| +
|
| static HGLRC GL_BINDING_CALL Debug_wglCreateLayerContext(HDC hdc,
|
| int iLayerPlane) {
|
| GL_SERVICE_LOG("wglCreateLayerContext"
|
| @@ -331,6 +355,10 @@ void DriverWGL::InitializeDebugBindings() {
|
| debug_fn.wglCreateContextFn = fn.wglCreateContextFn;
|
| fn.wglCreateContextFn = Debug_wglCreateContext;
|
| }
|
| + if (!debug_fn.wglCreateContextAttribsARBFn) {
|
| + debug_fn.wglCreateContextAttribsARBFn = fn.wglCreateContextAttribsARBFn;
|
| + fn.wglCreateContextAttribsARBFn = Debug_wglCreateContextAttribsARB;
|
| + }
|
| if (!debug_fn.wglCreateLayerContextFn) {
|
| debug_fn.wglCreateLayerContextFn = fn.wglCreateLayerContextFn;
|
| fn.wglCreateLayerContextFn = Debug_wglCreateLayerContext;
|
| @@ -417,6 +445,13 @@ HGLRC WGLApiBase::wglCreateContextFn(HDC hdc) {
|
| return driver_->fn.wglCreateContextFn(hdc);
|
| }
|
|
|
| +HGLRC WGLApiBase::wglCreateContextAttribsARBFn(HDC hDC,
|
| + HGLRC hShareContext,
|
| + const int* attribList) {
|
| + return driver_->fn.wglCreateContextAttribsARBFn(hDC, hShareContext,
|
| + attribList);
|
| +}
|
| +
|
| HGLRC WGLApiBase::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
|
| return driver_->fn.wglCreateLayerContextFn(hdc, iLayerPlane);
|
| }
|
| @@ -506,6 +541,13 @@ HGLRC TraceWGLApi::wglCreateContextFn(HDC hdc) {
|
| return wgl_api_->wglCreateContextFn(hdc);
|
| }
|
|
|
| +HGLRC TraceWGLApi::wglCreateContextAttribsARBFn(HDC hDC,
|
| + HGLRC hShareContext,
|
| + const int* attribList) {
|
| + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContextAttribsARB")
|
| + return wgl_api_->wglCreateContextAttribsARBFn(hDC, hShareContext, attribList);
|
| +}
|
| +
|
| HGLRC TraceWGLApi::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
|
| TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateLayerContext")
|
| return wgl_api_->wglCreateLayerContextFn(hdc, iLayerPlane);
|
|
|