Add support for EGLImage to GrGLInterface

BUG=skia:

Review URL: https://codereview.chromium.org/1434813002
diff --git a/include/gpu/gl/GrGLExtensions.h b/include/gpu/gl/GrGLExtensions.h
index 96c5ed1..cda0796 100644
--- a/include/gpu/gl/GrGLExtensions.h
+++ b/include/gpu/gl/GrGLExtensions.h
@@ -17,7 +17,8 @@
 /**
  * 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 @@
     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 6be48bc..a8a721e 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -349,6 +349,11 @@
 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 808a3be..ec27ace 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -128,8 +128,6 @@
     typedef SkRefCnt INHERITED;
 
 public:
-    
-
     GrGLInterface();
 
     static GrGLInterface* NewClone(const GrGLInterface*);
@@ -498,6 +496,10 @@
         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 04154f3..275eba5 100644
--- a/include/gpu/gl/GrGLTypes.h
+++ b/include/gpu/gl/GrGLTypes.h
@@ -58,6 +58,18 @@
 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