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

Side by Side Diff: src/gpu/gl/mesa/GrGLCreateMesaInterface.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 #include "gl/GrGLExtensions.h" 9 #include "gl/GrGLExtensions.h"
10 #include "gl/GrGLInterface.h" 10 #include "gl/GrGLInterface.h"
(...skipping 12 matching lines...) Expand all
23 23
24 const GrGLInterface* GrGLCreateMesaInterface() { 24 const GrGLInterface* GrGLCreateMesaInterface() {
25 if (NULL != OSMesaGetCurrentContext()) { 25 if (NULL != OSMesaGetCurrentContext()) {
26 26
27 GrGLGetStringProc getString = (GrGLGetStringProc) OSMesaGetProcAddress(" glGetString"); 27 GrGLGetStringProc getString = (GrGLGetStringProc) OSMesaGetProcAddress(" glGetString");
28 GrGLGetStringiProc getStringi = (GrGLGetStringiProc) OSMesaGetProcAddres s("glGetStringi"); 28 GrGLGetStringiProc getStringi = (GrGLGetStringiProc) OSMesaGetProcAddres s("glGetStringi");
29 GrGLGetIntegervProc getIntegerv = 29 GrGLGetIntegervProc getIntegerv =
30 (GrGLGetIntegervProc) OSMesaGetProcAddress("glGetIntegerv"); 30 (GrGLGetIntegervProc) OSMesaGetProcAddress("glGetIntegerv");
31 31
32 GrGLExtensions extensions; 32 GrGLExtensions extensions;
33 if (!extensions.init(kDesktop_GrGLBinding, getString, getStringi, getInt egerv)) { 33 if (!extensions.init(kGL_GrGLStandard, getString, getStringi, getInteger v)) {
34 return NULL; 34 return NULL;
35 } 35 }
36 36
37 const char* versionString = (const char*) getString(GL_VERSION); 37 const char* versionString = (const char*) getString(GL_VERSION);
38 GrGLVersion glVer = GrGLGetVersionFromString(versionString); 38 GrGLVersion glVer = GrGLGetVersionFromString(versionString);
39 39
40 if (glVer < GR_GL_VER(1,5)) { 40 if (glVer < GR_GL_VER(1,5)) {
41 // We must have array and element_array buffer objects. 41 // We must have array and element_array buffer objects.
42 return NULL; 42 return NULL;
43 } 43 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 if (extensions.has("GL_EXT_framebuffer_blit")) { 214 if (extensions.has("GL_EXT_framebuffer_blit")) {
215 GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT); 215 GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT);
216 } 216 }
217 } else { 217 } else {
218 // we must have FBOs 218 // we must have FBOs
219 delete interface; 219 delete interface;
220 return NULL; 220 return NULL;
221 } 221 }
222 GR_GL_GET_PROC(BindFragDataLocationIndexed); 222 GR_GL_GET_PROC(BindFragDataLocationIndexed);
223 interface->fBindingsExported = kDesktop_GrGLBinding; 223 interface->fStandard = kGL_GrGLStandard;
224 return interface; 224 return interface;
225 } else { 225 } else {
226 return NULL; 226 return NULL;
227 } 227 }
228 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698