diff options
Diffstat (limited to 'ui/gfx/gl/gl_context_wgl.cc')
-rw-r--r-- | ui/gfx/gl/gl_context_wgl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/gfx/gl/gl_context_wgl.cc b/ui/gfx/gl/gl_context_wgl.cc index dc75b78..01506c0 100644 --- a/ui/gfx/gl/gl_context_wgl.cc +++ b/ui/gfx/gl/gl_context_wgl.cc @@ -28,7 +28,7 @@ std::string GLContextWGL::GetExtensions() { // able to use surface_ here. Either use a display device context or the // surface that was passed to MakeCurrent. const char* extensions = wglGetExtensionsStringARB( - GLSurfaceWGL::GetDisplay()); + GLSurfaceWGL::GetDisplayDC()); if (extensions) { return GLContext::GetExtensions() + " " + extensions; } @@ -39,13 +39,12 @@ std::string GLContextWGL::GetExtensions() { bool GLContextWGL::Initialize( GLSurface* compatible_surface, GpuPreference gpu_preference) { - GLSurfaceWGL* surface_wgl = static_cast<GLSurfaceWGL*>(compatible_surface); - // TODO(apatrick): When contexts and surfaces are separated, we won't be // able to use surface_ here. Either use a display device context or a // surface that the context is compatible with not necessarily limited to // rendering to. - context_ = wglCreateContext(static_cast<HDC>(surface_wgl->GetHandle())); + context_ = wglCreateContext( + static_cast<HDC>(compatible_surface->GetHandle())); if (!context_) { LOG(ERROR) << "Failed to create GL context."; Destroy(); |