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

Unified Diff: include/gpu/gl/GrGLFunctions.h

Issue 1674823002: Replace GrGLInterface's function pointers with std::functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase & cleanup Created 4 years, 10 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
Index: include/gpu/gl/GrGLFunctions.h
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h
index 3fd912f222e236bf97fbde3b00a78aaf9b827b5c..4d0d6540cdac778ca32835001603c2fdec4dde6d 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -9,7 +9,9 @@
#ifndef GrGLFunctions_DEFINED
#define GrGLFunctions_DEFINED
+#include <functional>
#include "GrGLTypes.h"
+#include "../private/SkTLogic.h"
extern "C" {
@@ -352,4 +354,7 @@ typedef GrEGLImage (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy,
typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay dpy, GrEGLImage image);
} // extern "C"
+template <typename GLPTR> using GrGLFunction =
+ std::function<typename std::remove_pointer<GLPTR>::type>;
+
#endif

Powered by Google App Engine
This is Rietveld 408576698