diff options
Diffstat (limited to 'src/gpu/gl/win')
-rw-r--r-- | src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/win/SkNativeGLContext_win.cpp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp index 4b55a5d031..ef8eccc2b9 100644 --- a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp +++ b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp @@ -25,7 +25,7 @@ const GrGLInterface* GrGLCreateNativeInterface() { // wglGetProcAddress requires a context. // GL Function pointers retrieved in one context may not be valid in another - // context. For that reason we create a new GrGLInterface each time we're + // context. For that reason we create a new GrGLInterface each time we're // called. if (NULL != wglGetCurrentContext()) { const char* versionString = (const char*) glGetString(GL_VERSION); @@ -118,7 +118,7 @@ const GrGLInterface* GrGLCreateNativeInterface() { GR_GL_GET_PROC(GetQueryiv); GR_GL_GET_PROC(GetQueryObjectiv); GR_GL_GET_PROC(GetQueryObjectuiv); - if (glVer > GR_GL_VER(3,3) || + if (glVer > GR_GL_VER(3,3) || GrGLHasExtensionFromString("GL_ARB_timer_query", extString)) { GR_GL_GET_PROC(GetQueryObjecti64v); GR_GL_GET_PROC(GetQueryObjectui64v); @@ -166,7 +166,7 @@ const GrGLInterface* GrGLCreateNativeInterface() { // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since // GL_ARB_framebuffer_object doesn't use ARB suffix.) - if (glVer > GR_GL_VER(3,0) || + if (glVer > GR_GL_VER(3,0) || GrGLHasExtensionFromString("GL_ARB_framebuffer_object", extString)) { GR_GL_GET_PROC(GenFramebuffers); GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv); diff --git a/src/gpu/gl/win/SkNativeGLContext_win.cpp b/src/gpu/gl/win/SkNativeGLContext_win.cpp index 9650bc1199..00829207ac 100644 --- a/src/gpu/gl/win/SkNativeGLContext_win.cpp +++ b/src/gpu/gl/win/SkNativeGLContext_win.cpp @@ -84,7 +84,7 @@ const GrGLInterface* SkNativeGLContext::createGLContext() { this->destroyGLContext(); return NULL; } - + PIXELFORMATDESCRIPTOR pfd; ZeroMemory(&pfd, sizeof(pfd)); pfd.nSize = sizeof(pfd); @@ -95,20 +95,20 @@ const GrGLInterface* SkNativeGLContext::createGLContext() { pfd.cDepthBits = 0; pfd.cStencilBits = 0; pfd.iLayerType = PFD_MAIN_PLANE; - + int pixelFormat = 0; if (!(pixelFormat = ChoosePixelFormat(fDeviceContext, &pfd))) { SkDebugf("No matching pixel format descriptor.\n"); this->destroyGLContext(); return NULL; } - + if (!SetPixelFormat(fDeviceContext, pixelFormat, &pfd)) { SkDebugf("Could not set the pixel format %d.\n", pixelFormat); this->destroyGLContext(); return NULL; } - + if (!(fGlRenderContext = wglCreateContext(fDeviceContext))) { SkDebugf("Could not create rendering context.\n"); this->destroyGLContext(); |