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

Unified Diff: ui/gl/gl_implementation.cc

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_implementation.h ('k') | ui/gl/gl_implementation_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_implementation.cc
diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc
index d8de8c26913c24ee4c96a45ff1533bfc63a38a62..be33ea3ea0121e1582c6e1d434777333b994ec35 100644
--- a/ui/gl/gl_implementation.cc
+++ b/ui/gl/gl_implementation.cc
@@ -45,21 +45,6 @@ void CleanupNativeLibraries(void* unused) {
}
}
-bool ExportsCoreFunctionsFromGetProcAddress(GLImplementation implementation) {
- switch (GetGLImplementation()) {
- case kGLImplementationDesktopGL:
- case kGLImplementationOSMesaGL:
- case kGLImplementationAppleGL:
- case kGLImplementationMockGL:
- return true;
- case kGLImplementationEGLGLES2:
- return false;
- default:
- NOTREACHED();
- return true;
- }
-}
-
}
base::ThreadLocalPointer<GLApi>* g_current_gl_context_tls = NULL;
@@ -137,7 +122,7 @@ void SetGLGetProcAddressProc(GLGetProcAddressProc proc) {
g_get_proc_address = proc;
}
-void* GetGLCoreProcAddress(const char* name) {
+void* GetGLProcAddress(const char* name) {
DCHECK(g_gl_implementation != kGLImplementationNone);
if (g_libraries) {
@@ -148,8 +133,7 @@ void* GetGLCoreProcAddress(const char* name) {
return proc;
}
}
- if (ExportsCoreFunctionsFromGetProcAddress(g_gl_implementation) &&
- g_get_proc_address) {
+ if (g_get_proc_address) {
void* proc = g_get_proc_address(name);
if (proc)
return proc;
@@ -158,17 +142,4 @@ void* GetGLCoreProcAddress(const char* name) {
return NULL;
}
-void* GetGLProcAddress(const char* name) {
- DCHECK(g_gl_implementation != kGLImplementationNone);
-
- void* proc = GetGLCoreProcAddress(name);
- if (!proc && g_get_proc_address) {
- proc = g_get_proc_address(name);
- if (proc)
- return proc;
- }
-
- return proc;
-}
-
} // namespace gfx
« no previous file with comments | « ui/gl/gl_implementation.h ('k') | ui/gl/gl_implementation_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698