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

Side by Side Diff: src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp

Issue 357343002: Fix ANGLE build wrong glGetString being called issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLAssembleInterface.h" 10 #include "gl/GrGLAssembleInterface.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const GrGLInterface* GrGLCreateNativeInterface() { 75 const GrGLInterface* GrGLCreateNativeInterface() {
76 if (NULL == wglGetCurrentContext()) { 76 if (NULL == wglGetCurrentContext()) {
77 return NULL; 77 return NULL;
78 } 78 }
79 79
80 GLProcGetter getter; 80 GLProcGetter getter;
81 if (!getter.isInitialized()) { 81 if (!getter.isInitialized()) {
82 return NULL; 82 return NULL;
83 } 83 }
84 84
85 const char* verStr = reinterpret_cast<const char*>(glGetString(GR_GL_VERSION )); 85 GrGLGetStringProc getString = (GrGLGetStringProc)getter.getProc("glGetString ");
86 if (NULL == getString) {
87 return NULL;
88 }
89 const char* verStr = reinterpret_cast<const char*>(getString(GR_GL_VERSION)) ;
86 GrGLStandard standard = GrGLGetStandardInUseFromString(verStr); 90 GrGLStandard standard = GrGLGetStandardInUseFromString(verStr);
87 91
88 if (kGLES_GrGLStandard == standard) { 92 if (kGLES_GrGLStandard == standard) {
89 return GrGLAssembleGLESInterface(&getter, win_get_gl_proc); 93 return GrGLAssembleGLESInterface(&getter, win_get_gl_proc);
90 } else if (kGL_GrGLStandard == standard) { 94 } else if (kGL_GrGLStandard == standard) {
91 return GrGLAssembleGLInterface(&getter, win_get_gl_proc); 95 return GrGLAssembleGLInterface(&getter, win_get_gl_proc);
92 } 96 }
93 return NULL; 97 return NULL;
94 } 98 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698