aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpu/gl/GrGLExtensions.h7
-rw-r--r--include/gpu/gl/GrGLFunctions.h5
-rw-r--r--include/gpu/gl/GrGLInterface.h6
-rw-r--r--include/gpu/gl/GrGLTypes.h12
4 files changed, 26 insertions, 4 deletions
diff --git a/include/gpu/gl/GrGLExtensions.h b/include/gpu/gl/GrGLExtensions.h
index 96c5ed1222..cda0796d42 100644
--- a/include/gpu/gl/GrGLExtensions.h
+++ b/include/gpu/gl/GrGLExtensions.h
@@ -17,7 +17,8 @@ struct GrGLInterface;
/**
* This helper queries the current GL context for its extensions, remembers them, and can be
* queried. It supports both glGetString- and glGetStringi-style extension string APIs and will
- * use the latter if it is available.
+ * use the latter if it is available. It also will query for EGL extensions if a eglQueryString
+ * implementation is provided.
*/
class SK_API GrGLExtensions {
public:
@@ -40,7 +41,9 @@ public:
bool init(GrGLStandard standard,
GrGLGetStringProc getString,
GrGLGetStringiProc getStringi,
- GrGLGetIntegervProc getIntegerv);
+ GrGLGetIntegervProc getIntegerv,
+ GrEGLQueryStringProc queryString,
+ GrEGLDisplay eglDisplay);
bool isInitialized() const { return fInitialized; }
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h
index 6be48bc599..a8a721e7e6 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -349,6 +349,11 @@ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPushDebugGroupProc)(GrGLenum source,
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPopDebugGroupProc)();
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLObjectLabelProc)(GrGLenum identifier, GrGLuint name, GrGLsizei length, const GrGLchar *label);
+/** EGL functions */
+typedef const char* (GR_GL_FUNCTION_TYPE* GrEGLQueryStringProc)(GrEGLDisplay dpy, GrEGLint name);
+typedef GrEGLDisplay (GR_GL_FUNCTION_TYPE* GrEGLGetCurrentDisplayProc)();
+typedef GrEGLImageKHR (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint *attrib_list);
+typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay dpy, GrEGLImageKHR image);
} // extern "C"
#endif
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index 808a3be79c..ec27ace81f 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -128,8 +128,6 @@ private:
typedef SkRefCnt INHERITED;
public:
-
-
GrGLInterface();
static GrGLInterface* NewClone(const GrGLInterface*);
@@ -498,6 +496,10 @@ public:
GLPtr<GrGLPushDebugGroupProc> fPushDebugGroup;
GLPtr<GrGLPopDebugGroupProc> fPopDebugGroup;
GLPtr<GrGLObjectLabelProc> fObjectLabel;
+
+ /* EGL functions */
+ GLPtr<GrEGLCreateImageProc> fCreateImage;
+ GLPtr<GrEGLDestroyImageProc> fDestroyImage;
} fFunctions;
// Per-GL func callback
diff --git a/include/gpu/gl/GrGLTypes.h b/include/gpu/gl/GrGLTypes.h
index 04154f312c..275eba556d 100644
--- a/include/gpu/gl/GrGLTypes.h
+++ b/include/gpu/gl/GrGLTypes.h
@@ -58,6 +58,18 @@ typedef signed long int GrGLintptr;
typedef signed long int GrGLsizeiptr;
#endif
+/**
+ * EGL types.
+ */
+
+typedef void* GrEGLImageKHR;
+typedef void* GrEGLDisplay;
+typedef void* GrEGLContext;
+typedef void* GrEGLClientBuffer;
+typedef unsigned int GrEGLenum;
+typedef int32_t GrEGLint;
+typedef unsigned int GrEGLBoolean;
+
///////////////////////////////////////////////////////////////////////////////
/**
* Types for interacting with GL resources created externally to Skia. GrBackendObjects for GL