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

Unified Diff: ui/gl/gl_implementation.h

Issue 2588263005: Change GLGetProcAddress typedef to function returning function pointer (Closed)
Patch Set: fix cast Created 4 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_bindings_autogen_mock.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_implementation.h
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h
index 3566f368b4c3310f18d5853637cf71653575dab6..dc425076a098828531057b264302407f58bbee21 100644
--- a/ui/gl/gl_implementation.h
+++ b/ui/gl/gl_implementation.h
@@ -35,10 +35,11 @@ struct GL_EXPORT GLWindowSystemBindingInfo {
bool direct_rendering;
};
+using GLFunctionPointerType = void (*)();
Ken Russell (switch to Gerrit) 2016/12/21 16:45:17 Is it OK that this "using" statement doesn't inclu
#if defined(OS_WIN)
-typedef void* (WINAPI *GLGetProcAddressProc)(const char* name);
+typedef GLFunctionPointerType(WINAPI* GLGetProcAddressProc)(const char* name);
#else
-typedef void* (*GLGetProcAddressProc)(const char* name);
+typedef GLFunctionPointerType (*GLGetProcAddressProc)(const char* name);
#endif
// Initialize stub methods for drawing operations in the GL bindings. The
@@ -99,7 +100,7 @@ GL_EXPORT void SetGLGetProcAddressProc(GLGetProcAddressProc proc);
// and when querying functions from the EGL library supplied by Android, it may
// return a function that prints a log message about the function being
// unsupported.
-GL_EXPORT void* GetGLProcAddress(const char* name);
+GL_EXPORT GLFunctionPointerType GetGLProcAddress(const char* name);
// Helper for fetching the OpenGL extensions from the current context.
// This helper abstracts over differences between the desktop OpenGL
« no previous file with comments | « ui/gl/gl_bindings_autogen_mock.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698