diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 2 | ||||
-rw-r--r-- | include/gpu/gl/GrGLInterface.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index e0bc39015f..15dc154a01 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -308,6 +308,8 @@ public: return fCall != nullptr; } + void reset() { fCall = nullptr; } + private: R (*fCall)(const void*, Args...); size_t fBuf[4]; diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index bf2685eb1c..0b7bd96814 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -77,6 +77,7 @@ public: /** * The function pointers are in a struct so that we can have a compiler generated assignment * operator. + * If one were to add a new function to this struct, one should also clear it in abandon. */ struct Functions { GrGLFunction<GrGLActiveTextureProc> fActiveTexture; @@ -335,8 +336,10 @@ public: GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage; } fFunctions; +#if GR_TEST_UTILS // This exists for internal testing. - virtual void abandon() const {} + virtual void abandon() const; +#endif }; #endif |