GrGLInterface.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. /*
  2. * Copyright 2011 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef GrGLInterface_DEFINED
  8. #define GrGLInterface_DEFINED
  9. #include "GrGLFunctions.h"
  10. #include "GrGLExtensions.h"
  11. #include "SkRefCnt.h"
  12. ////////////////////////////////////////////////////////////////////////////////
  13. typedef void(*GrGLFuncPtr)();
  14. struct GrGLInterface;
  15. /**
  16. * Rather than depend on platform-specific GL headers and libraries, we require
  17. * the client to provide a struct of GL function pointers. This struct can be
  18. * specified per-GrContext as a parameter to GrContext::MakeGL. If no interface is
  19. * passed to MakeGL then a default GL interface is created using GrGLMakeNativeInterface().
  20. * If this returns nullptr then GrContext::MakeGL() will fail.
  21. *
  22. * The implementation of GrGLMakeNativeInterface is platform-specific. Several
  23. * implementations have been provided (for GLX, WGL, EGL, etc), along with an
  24. * implementation that simply returns nullptr. Clients should select the most
  25. * appropriate one to build.
  26. */
  27. SK_API sk_sp<const GrGLInterface> GrGLMakeNativeInterface();
  28. // Deprecated alternative to GrGLMakeNativeInterface().
  29. SK_API const GrGLInterface* GrGLCreateNativeInterface();
  30. /**
  31. * Creates a null GrGLInterface that doesn't draw anything. Used for measuring
  32. * CPU overhead. TODO: We would like to move this to tools/gpu/gl/null but currently
  33. * Chromium is using it in its unit tests.
  34. */
  35. const SK_API GrGLInterface* GrGLCreateNullInterface(bool enableNVPR = false);
  36. /**
  37. * GrContext uses the following interface to make all calls into OpenGL. When a
  38. * GrContext is created it is given a GrGLInterface. The interface's function
  39. * pointers must be valid for the OpenGL context associated with the GrContext.
  40. * On some platforms, such as Windows, function pointers for OpenGL extensions
  41. * may vary between OpenGL contexts. So the caller must be careful to use a
  42. * GrGLInterface initialized for the correct context. All functions that should
  43. * be available based on the OpenGL's version and extension string must be
  44. * non-NULL or GrContext creation will fail. This can be tested with the
  45. * validate() method when the OpenGL context has been made current.
  46. */
  47. struct SK_API GrGLInterface : public SkRefCnt {
  48. private:
  49. typedef SkRefCnt INHERITED;
  50. public:
  51. GrGLInterface();
  52. // Validates that the GrGLInterface supports its advertised standard. This means the necessary
  53. // function pointers have been initialized for both the GL version and any advertised
  54. // extensions.
  55. bool validate() const;
  56. // Indicates the type of GL implementation
  57. union {
  58. GrGLStandard fStandard;
  59. GrGLStandard fBindingsExported; // Legacy name, will be remove when Chromium is updated.
  60. };
  61. GrGLExtensions fExtensions;
  62. bool hasExtension(const char ext[]) const { return fExtensions.has(ext); }
  63. /**
  64. * The function pointers are in a struct so that we can have a compiler generated assignment
  65. * operator.
  66. */
  67. struct Functions {
  68. GrGLFunction<GrGLActiveTextureFn> fActiveTexture;
  69. GrGLFunction<GrGLAttachShaderFn> fAttachShader;
  70. GrGLFunction<GrGLBeginQueryFn> fBeginQuery;
  71. GrGLFunction<GrGLBindAttribLocationFn> fBindAttribLocation;
  72. GrGLFunction<GrGLBindBufferFn> fBindBuffer;
  73. GrGLFunction<GrGLBindFragDataLocationFn> fBindFragDataLocation;
  74. GrGLFunction<GrGLBindFragDataLocationIndexedFn> fBindFragDataLocationIndexed;
  75. GrGLFunction<GrGLBindFramebufferFn> fBindFramebuffer;
  76. GrGLFunction<GrGLBindRenderbufferFn> fBindRenderbuffer;
  77. GrGLFunction<GrGLBindSamplerFn> fBindSampler;
  78. GrGLFunction<GrGLBindTextureFn> fBindTexture;
  79. GrGLFunction<GrGLBindVertexArrayFn> fBindVertexArray;
  80. GrGLFunction<GrGLBlendBarrierFn> fBlendBarrier;
  81. GrGLFunction<GrGLBlendColorFn> fBlendColor;
  82. GrGLFunction<GrGLBlendEquationFn> fBlendEquation;
  83. GrGLFunction<GrGLBlendFuncFn> fBlendFunc;
  84. GrGLFunction<GrGLBlitFramebufferFn> fBlitFramebuffer;
  85. GrGLFunction<GrGLBufferDataFn> fBufferData;
  86. GrGLFunction<GrGLBufferSubDataFn> fBufferSubData;
  87. GrGLFunction<GrGLCheckFramebufferStatusFn> fCheckFramebufferStatus;
  88. GrGLFunction<GrGLClearFn> fClear;
  89. GrGLFunction<GrGLClearColorFn> fClearColor;
  90. GrGLFunction<GrGLClearStencilFn> fClearStencil;
  91. GrGLFunction<GrGLClearTexImageFn> fClearTexImage;
  92. GrGLFunction<GrGLClearTexSubImageFn> fClearTexSubImage;
  93. GrGLFunction<GrGLColorMaskFn> fColorMask;
  94. GrGLFunction<GrGLCompileShaderFn> fCompileShader;
  95. GrGLFunction<GrGLCompressedTexImage2DFn> fCompressedTexImage2D;
  96. GrGLFunction<GrGLCompressedTexSubImage2DFn> fCompressedTexSubImage2D;
  97. GrGLFunction<GrGLCopyTexSubImage2DFn> fCopyTexSubImage2D;
  98. GrGLFunction<GrGLCreateProgramFn> fCreateProgram;
  99. GrGLFunction<GrGLCreateShaderFn> fCreateShader;
  100. GrGLFunction<GrGLCullFaceFn> fCullFace;
  101. GrGLFunction<GrGLDeleteBuffersFn> fDeleteBuffers;
  102. GrGLFunction<GrGLDeleteFramebuffersFn> fDeleteFramebuffers;
  103. GrGLFunction<GrGLDeleteProgramFn> fDeleteProgram;
  104. GrGLFunction<GrGLDeleteQueriesFn> fDeleteQueries;
  105. GrGLFunction<GrGLDeleteRenderbuffersFn> fDeleteRenderbuffers;
  106. GrGLFunction<GrGLDeleteSamplersFn> fDeleteSamplers;
  107. GrGLFunction<GrGLDeleteShaderFn> fDeleteShader;
  108. GrGLFunction<GrGLDeleteTexturesFn> fDeleteTextures;
  109. GrGLFunction<GrGLDeleteVertexArraysFn> fDeleteVertexArrays;
  110. GrGLFunction<GrGLDepthMaskFn> fDepthMask;
  111. GrGLFunction<GrGLDisableFn> fDisable;
  112. GrGLFunction<GrGLDisableVertexAttribArrayFn> fDisableVertexAttribArray;
  113. GrGLFunction<GrGLDrawArraysFn> fDrawArrays;
  114. GrGLFunction<GrGLDrawArraysIndirectFn> fDrawArraysIndirect;
  115. GrGLFunction<GrGLDrawArraysInstancedFn> fDrawArraysInstanced;
  116. GrGLFunction<GrGLDrawBufferFn> fDrawBuffer;
  117. GrGLFunction<GrGLDrawBuffersFn> fDrawBuffers;
  118. GrGLFunction<GrGLDrawElementsFn> fDrawElements;
  119. GrGLFunction<GrGLDrawElementsIndirectFn> fDrawElementsIndirect;
  120. GrGLFunction<GrGLDrawElementsInstancedFn> fDrawElementsInstanced;
  121. GrGLFunction<GrGLDrawRangeElementsFn> fDrawRangeElements;
  122. GrGLFunction<GrGLEnableFn> fEnable;
  123. GrGLFunction<GrGLEnableVertexAttribArrayFn> fEnableVertexAttribArray;
  124. GrGLFunction<GrGLEndQueryFn> fEndQuery;
  125. GrGLFunction<GrGLFinishFn> fFinish;
  126. GrGLFunction<GrGLFlushFn> fFlush;
  127. GrGLFunction<GrGLFlushMappedBufferRangeFn> fFlushMappedBufferRange;
  128. GrGLFunction<GrGLFramebufferRenderbufferFn> fFramebufferRenderbuffer;
  129. GrGLFunction<GrGLFramebufferTexture2DFn> fFramebufferTexture2D;
  130. GrGLFunction<GrGLFramebufferTexture2DMultisampleFn> fFramebufferTexture2DMultisample;
  131. GrGLFunction<GrGLFrontFaceFn> fFrontFace;
  132. GrGLFunction<GrGLGenBuffersFn> fGenBuffers;
  133. GrGLFunction<GrGLGenFramebuffersFn> fGenFramebuffers;
  134. GrGLFunction<GrGLGenerateMipmapFn> fGenerateMipmap;
  135. GrGLFunction<GrGLGenQueriesFn> fGenQueries;
  136. GrGLFunction<GrGLGenRenderbuffersFn> fGenRenderbuffers;
  137. GrGLFunction<GrGLGenSamplersFn> fGenSamplers;
  138. GrGLFunction<GrGLGenTexturesFn> fGenTextures;
  139. GrGLFunction<GrGLGenVertexArraysFn> fGenVertexArrays;
  140. GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv;
  141. GrGLFunction<GrGLGetErrorFn> fGetError;
  142. GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv;
  143. GrGLFunction<GrGLGetIntegervFn> fGetIntegerv;
  144. GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv;
  145. GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary;
  146. GrGLFunction<GrGLGetProgramInfoLogFn> fGetProgramInfoLog;
  147. GrGLFunction<GrGLGetProgramivFn> fGetProgramiv;
  148. GrGLFunction<GrGLGetQueryObjecti64vFn> fGetQueryObjecti64v;
  149. GrGLFunction<GrGLGetQueryObjectivFn> fGetQueryObjectiv;
  150. GrGLFunction<GrGLGetQueryObjectui64vFn> fGetQueryObjectui64v;
  151. GrGLFunction<GrGLGetQueryObjectuivFn> fGetQueryObjectuiv;
  152. GrGLFunction<GrGLGetQueryivFn> fGetQueryiv;
  153. GrGLFunction<GrGLGetRenderbufferParameterivFn> fGetRenderbufferParameteriv;
  154. GrGLFunction<GrGLGetShaderInfoLogFn> fGetShaderInfoLog;
  155. GrGLFunction<GrGLGetShaderivFn> fGetShaderiv;
  156. GrGLFunction<GrGLGetShaderPrecisionFormatFn> fGetShaderPrecisionFormat;
  157. GrGLFunction<GrGLGetStringFn> fGetString;
  158. GrGLFunction<GrGLGetStringiFn> fGetStringi;
  159. GrGLFunction<GrGLGetTexLevelParameterivFn> fGetTexLevelParameteriv;
  160. GrGLFunction<GrGLGetUniformLocationFn> fGetUniformLocation;
  161. GrGLFunction<GrGLInsertEventMarkerFn> fInsertEventMarker;
  162. GrGLFunction<GrGLInvalidateBufferDataFn> fInvalidateBufferData;
  163. GrGLFunction<GrGLInvalidateBufferSubDataFn> fInvalidateBufferSubData;
  164. GrGLFunction<GrGLInvalidateFramebufferFn> fInvalidateFramebuffer;
  165. GrGLFunction<GrGLInvalidateSubFramebufferFn> fInvalidateSubFramebuffer;
  166. GrGLFunction<GrGLInvalidateTexImageFn> fInvalidateTexImage;
  167. GrGLFunction<GrGLInvalidateTexSubImageFn> fInvalidateTexSubImage;
  168. GrGLFunction<GrGLIsTextureFn> fIsTexture;
  169. GrGLFunction<GrGLLineWidthFn> fLineWidth;
  170. GrGLFunction<GrGLLinkProgramFn> fLinkProgram;
  171. GrGLFunction<GrGLProgramBinaryFn> fProgramBinary;
  172. GrGLFunction<GrGLProgramParameteriFn> fProgramParameteri;
  173. GrGLFunction<GrGLMapBufferFn> fMapBuffer;
  174. GrGLFunction<GrGLMapBufferRangeFn> fMapBufferRange;
  175. GrGLFunction<GrGLMapBufferSubDataFn> fMapBufferSubData;
  176. GrGLFunction<GrGLMapTexSubImage2DFn> fMapTexSubImage2D;
  177. GrGLFunction<GrGLMultiDrawArraysIndirectFn> fMultiDrawArraysIndirect;
  178. GrGLFunction<GrGLMultiDrawElementsIndirectFn> fMultiDrawElementsIndirect;
  179. GrGLFunction<GrGLPixelStoreiFn> fPixelStorei;
  180. GrGLFunction<GrGLPolygonModeFn> fPolygonMode;
  181. GrGLFunction<GrGLPopGroupMarkerFn> fPopGroupMarker;
  182. GrGLFunction<GrGLPushGroupMarkerFn> fPushGroupMarker;
  183. GrGLFunction<GrGLQueryCounterFn> fQueryCounter;
  184. GrGLFunction<GrGLRasterSamplesFn> fRasterSamples;
  185. GrGLFunction<GrGLReadBufferFn> fReadBuffer;
  186. GrGLFunction<GrGLReadPixelsFn> fReadPixels;
  187. GrGLFunction<GrGLRenderbufferStorageFn> fRenderbufferStorage;
  188. // On OpenGL ES there are multiple incompatible extensions that add support for MSAA
  189. // and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
  190. // older extensions for performance reasons or due to ES3 driver bugs. We want the function
  191. // that creates the GrGLInterface to provide all available functions and internally
  192. // we will select among them. They all have a method called glRenderbufferStorageMultisample*.
  193. // So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture,
  194. // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample
  195. // variations.
  196. //
  197. // If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will
  198. // assume the function pointers for the standard (or equivalent GL_ARB) version have
  199. // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced
  200. // functionality.
  201. // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
  202. GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2EXT;
  203. // GL_APPLE_framebuffer_multisample
  204. GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2APPLE;
  205. // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
  206. // the standard function in ES3+ or GL 3.0+.
  207. GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisample;
  208. // Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
  209. GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation;
  210. GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer;
  211. GrGLFunction<GrGLSamplerParameteriFn> fSamplerParameteri;
  212. GrGLFunction<GrGLSamplerParameterivFn> fSamplerParameteriv;
  213. GrGLFunction<GrGLScissorFn> fScissor;
  214. GrGLFunction<GrGLShaderSourceFn> fShaderSource;
  215. GrGLFunction<GrGLStencilFuncFn> fStencilFunc;
  216. GrGLFunction<GrGLStencilFuncSeparateFn> fStencilFuncSeparate;
  217. GrGLFunction<GrGLStencilMaskFn> fStencilMask;
  218. GrGLFunction<GrGLStencilMaskSeparateFn> fStencilMaskSeparate;
  219. GrGLFunction<GrGLStencilOpFn> fStencilOp;
  220. GrGLFunction<GrGLStencilOpSeparateFn> fStencilOpSeparate;
  221. GrGLFunction<GrGLTexBufferFn> fTexBuffer;
  222. GrGLFunction<GrGLTexBufferRangeFn> fTexBufferRange;
  223. GrGLFunction<GrGLTexImage2DFn> fTexImage2D;
  224. GrGLFunction<GrGLTexParameteriFn> fTexParameteri;
  225. GrGLFunction<GrGLTexParameterivFn> fTexParameteriv;
  226. GrGLFunction<GrGLTexSubImage2DFn> fTexSubImage2D;
  227. GrGLFunction<GrGLTexStorage2DFn> fTexStorage2D;
  228. GrGLFunction<GrGLTextureBarrierFn> fTextureBarrier;
  229. GrGLFunction<GrGLDiscardFramebufferFn> fDiscardFramebuffer;
  230. GrGLFunction<GrGLUniform1fFn> fUniform1f;
  231. GrGLFunction<GrGLUniform1iFn> fUniform1i;
  232. GrGLFunction<GrGLUniform1fvFn> fUniform1fv;
  233. GrGLFunction<GrGLUniform1ivFn> fUniform1iv;
  234. GrGLFunction<GrGLUniform2fFn> fUniform2f;
  235. GrGLFunction<GrGLUniform2iFn> fUniform2i;
  236. GrGLFunction<GrGLUniform2fvFn> fUniform2fv;
  237. GrGLFunction<GrGLUniform2ivFn> fUniform2iv;
  238. GrGLFunction<GrGLUniform3fFn> fUniform3f;
  239. GrGLFunction<GrGLUniform3iFn> fUniform3i;
  240. GrGLFunction<GrGLUniform3fvFn> fUniform3fv;
  241. GrGLFunction<GrGLUniform3ivFn> fUniform3iv;
  242. GrGLFunction<GrGLUniform4fFn> fUniform4f;
  243. GrGLFunction<GrGLUniform4iFn> fUniform4i;
  244. GrGLFunction<GrGLUniform4fvFn> fUniform4fv;
  245. GrGLFunction<GrGLUniform4ivFn> fUniform4iv;
  246. GrGLFunction<GrGLUniformMatrix2fvFn> fUniformMatrix2fv;
  247. GrGLFunction<GrGLUniformMatrix3fvFn> fUniformMatrix3fv;
  248. GrGLFunction<GrGLUniformMatrix4fvFn> fUniformMatrix4fv;
  249. GrGLFunction<GrGLUnmapBufferFn> fUnmapBuffer;
  250. GrGLFunction<GrGLUnmapBufferSubDataFn> fUnmapBufferSubData;
  251. GrGLFunction<GrGLUnmapTexSubImage2DFn> fUnmapTexSubImage2D;
  252. GrGLFunction<GrGLUseProgramFn> fUseProgram;
  253. GrGLFunction<GrGLVertexAttrib1fFn> fVertexAttrib1f;
  254. GrGLFunction<GrGLVertexAttrib2fvFn> fVertexAttrib2fv;
  255. GrGLFunction<GrGLVertexAttrib3fvFn> fVertexAttrib3fv;
  256. GrGLFunction<GrGLVertexAttrib4fvFn> fVertexAttrib4fv;
  257. GrGLFunction<GrGLVertexAttribDivisorFn> fVertexAttribDivisor;
  258. GrGLFunction<GrGLVertexAttribIPointerFn> fVertexAttribIPointer;
  259. GrGLFunction<GrGLVertexAttribPointerFn> fVertexAttribPointer;
  260. GrGLFunction<GrGLViewportFn> fViewport;
  261. /* GL_NV_path_rendering */
  262. GrGLFunction<GrGLMatrixLoadfFn> fMatrixLoadf;
  263. GrGLFunction<GrGLMatrixLoadIdentityFn> fMatrixLoadIdentity;
  264. GrGLFunction<GrGLGetProgramResourceLocationFn> fGetProgramResourceLocation;
  265. GrGLFunction<GrGLPathCommandsFn> fPathCommands;
  266. GrGLFunction<GrGLPathParameteriFn> fPathParameteri;
  267. GrGLFunction<GrGLPathParameterfFn> fPathParameterf;
  268. GrGLFunction<GrGLGenPathsFn> fGenPaths;
  269. GrGLFunction<GrGLDeletePathsFn> fDeletePaths;
  270. GrGLFunction<GrGLIsPathFn> fIsPath;
  271. GrGLFunction<GrGLPathStencilFuncFn> fPathStencilFunc;
  272. GrGLFunction<GrGLStencilFillPathFn> fStencilFillPath;
  273. GrGLFunction<GrGLStencilStrokePathFn> fStencilStrokePath;
  274. GrGLFunction<GrGLStencilFillPathInstancedFn> fStencilFillPathInstanced;
  275. GrGLFunction<GrGLStencilStrokePathInstancedFn> fStencilStrokePathInstanced;
  276. GrGLFunction<GrGLCoverFillPathFn> fCoverFillPath;
  277. GrGLFunction<GrGLCoverStrokePathFn> fCoverStrokePath;
  278. GrGLFunction<GrGLCoverFillPathInstancedFn> fCoverFillPathInstanced;
  279. GrGLFunction<GrGLCoverStrokePathInstancedFn> fCoverStrokePathInstanced;
  280. // NV_path_rendering v1.2
  281. GrGLFunction<GrGLStencilThenCoverFillPathFn> fStencilThenCoverFillPath;
  282. GrGLFunction<GrGLStencilThenCoverStrokePathFn> fStencilThenCoverStrokePath;
  283. GrGLFunction<GrGLStencilThenCoverFillPathInstancedFn> fStencilThenCoverFillPathInstanced;
  284. GrGLFunction<GrGLStencilThenCoverStrokePathInstancedFn> fStencilThenCoverStrokePathInstanced;
  285. // NV_path_rendering v1.3
  286. GrGLFunction<GrGLProgramPathFragmentInputGenFn> fProgramPathFragmentInputGen;
  287. // CHROMIUM_path_rendering
  288. GrGLFunction<GrGLBindFragmentInputLocationFn> fBindFragmentInputLocation;
  289. /* NV_framebuffer_mixed_samples */
  290. GrGLFunction<GrGLCoverageModulationFn> fCoverageModulation;
  291. /* ARB_sample_shading */
  292. GrGLFunction<GrGLMinSampleShadingFn> fMinSampleShading;
  293. /* ARB_sync */
  294. GrGLFunction<GrGLFenceSyncFn> fFenceSync;
  295. GrGLFunction<GrGLIsSyncFn> fIsSync;
  296. GrGLFunction<GrGLClientWaitSyncFn> fClientWaitSync;
  297. GrGLFunction<GrGLWaitSyncFn> fWaitSync;
  298. GrGLFunction<GrGLDeleteSyncFn> fDeleteSync;
  299. /* ARB_internalforamt_query */
  300. GrGLFunction<GrGLGetInternalformativFn> fGetInternalformativ;
  301. /* KHR_debug */
  302. GrGLFunction<GrGLDebugMessageControlFn> fDebugMessageControl;
  303. GrGLFunction<GrGLDebugMessageInsertFn> fDebugMessageInsert;
  304. GrGLFunction<GrGLDebugMessageCallbackFn> fDebugMessageCallback;
  305. GrGLFunction<GrGLGetDebugMessageLogFn> fGetDebugMessageLog;
  306. GrGLFunction<GrGLPushDebugGroupFn> fPushDebugGroup;
  307. GrGLFunction<GrGLPopDebugGroupFn> fPopDebugGroup;
  308. GrGLFunction<GrGLObjectLabelFn> fObjectLabel;
  309. /* EXT_window_rectangles */
  310. GrGLFunction<GrGLWindowRectanglesFn> fWindowRectangles;
  311. /* EGL functions */
  312. GrGLFunction<GrEGLCreateImageFn> fEGLCreateImage;
  313. GrGLFunction<GrEGLDestroyImageFn> fEGLDestroyImage;
  314. } fFunctions;
  315. #if GR_TEST_UTILS
  316. // This exists for internal testing.
  317. virtual void abandon() const;
  318. #endif
  319. };
  320. #endif