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

Unified Diff: ui/gl/gl_implementation.cc

Issue 98643013: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Accommodated changes in content tests 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 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 5dac760d2a94feb31b0ec79b935b60b1c434b581..ee874db46e0435e399a79fbea79fa7e759512182 100644
--- a/ui/gl/gl_implementation.cc
+++ b/ui/gl/gl_implementation.cc
@@ -46,21 +46,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;
@@ -138,7 +123,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) {
@@ -149,8 +134,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;
@@ -159,19 +143,6 @@ 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;
-}
-
void InitializeNullDrawGLBindings() {
// This is platform independent, so it does not need to live in a platform
// specific implementation file.
« 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