Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp

Issue 133413003: Rename GrGLBinding->GrGLStandard, no longer a bitfield (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: actually fix enum names? Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "gl/GrGLInterface.h" 10 #include "gl/GrGLInterface.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 const GrGLInterface* GrGLCreateNativeInterface() { 45 const GrGLInterface* GrGLCreateNativeInterface() {
46 46
47 GrGLGetStringProc glGetString = (GrGLGetStringProc) GetProcAddress("glGetStr ing"); 47 GrGLGetStringProc glGetString = (GrGLGetStringProc) GetProcAddress("glGetStr ing");
48 GrGLGetStringiProc glGetStringi = (GrGLGetStringiProc) GetProcAddress("glGet Stringi"); 48 GrGLGetStringiProc glGetStringi = (GrGLGetStringiProc) GetProcAddress("glGet Stringi");
49 GrGLGetIntegervProc glGetIntegerv = (GrGLGetIntegervProc) GetProcAddress("gl GetIntegerv"); 49 GrGLGetIntegervProc glGetIntegerv = (GrGLGetIntegervProc) GetProcAddress("gl GetIntegerv");
50 50
51 const char* verStr = (const char*) glGetString(GR_GL_VERSION); 51 const char* verStr = (const char*) glGetString(GR_GL_VERSION);
52 GrGLVersion ver = GrGLGetVersionFromString(verStr); 52 GrGLVersion ver = GrGLGetVersionFromString(verStr);
53 GrGLExtensions extensions; 53 GrGLExtensions extensions;
54 if (!extensions.init(kDesktop_GrGLBinding, glGetString, glGetStringi, glGetI ntegerv)) { 54 if (!extensions.init(kGL_GrGLStandard, glGetString, glGetStringi, glGetInteg erv)) {
55 return NULL; 55 return NULL;
56 } 56 }
57 57
58 GrGLInterface* interface = SkNEW(GrGLInterface); 58 GrGLInterface* interface = SkNEW(GrGLInterface);
59 interface->fBindingsExported = kDesktop_GrGLBinding; 59 interface->fStandard = kGL_GrGLStandard;
60 60
61 GET_PROC(ActiveTexture); 61 GET_PROC(ActiveTexture);
62 GET_PROC(AttachShader); 62 GET_PROC(AttachShader);
63 GET_PROC(BeginQuery); 63 GET_PROC(BeginQuery);
64 GET_PROC(BindAttribLocation); 64 GET_PROC(BindAttribLocation);
65 GET_PROC(BindBuffer); 65 GET_PROC(BindBuffer);
66 if (ver >= GR_GL_VER(3,0)) { 66 if (ver >= GR_GL_VER(3,0)) {
67 GET_PROC(BindFragDataLocation); 67 GET_PROC(BindFragDataLocation);
68 } 68 }
69 GET_PROC(BindTexture); 69 GET_PROC(BindTexture);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (extensions.has("GL_EXT_framebuffer_blit")) { 236 if (extensions.has("GL_EXT_framebuffer_blit")) {
237 GET_PROC_SUFFIX(BlitFramebuffer, EXT); 237 GET_PROC_SUFFIX(BlitFramebuffer, EXT);
238 } 238 }
239 } 239 }
240 if (ver >= GR_GL_VER(3,3) || extensions.has("GL_ARB_blend_func_extended")) { 240 if (ver >= GR_GL_VER(3,3) || extensions.has("GL_ARB_blend_func_extended")) {
241 // ARB extension doesn't use the ARB suffix on the function name 241 // ARB extension doesn't use the ARB suffix on the function name
242 GET_PROC(BindFragDataLocationIndexed); 242 GET_PROC(BindFragDataLocationIndexed);
243 } 243 }
244 return interface; 244 return interface;
245 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698