From d6176b0dcacb124539e0cfd051e6d93a9782f020 Mon Sep 17 00:00:00 2001 From: "rmistry@google.com" Date: Thu, 23 Aug 2012 18:14:13 +0000 Subject: Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp | 6 +++--- src/gpu/gl/win/SkNativeGLContext_win.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gpu/gl/win') 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(); -- cgit v1.2.3