diff options
author | 2011-10-20 21:09:45 +0000 | |
---|---|---|
committer | 2011-10-20 21:09:45 +0000 | |
commit | d47fafe05743d61958397bcf7a4b2bf66d778e1d (patch) | |
tree | fac9722ac2921f86840813c7d0792be28851a7ca /include/gpu/SkNativeGLContext.h | |
parent | ffa11bbbedd201899eb93bf05089c511f53d5c2a (diff) |
Add test that validates GrGLInterfaces
Review URL: http://codereview.appspot.com/5304048/
git-svn-id: http://skia.googlecode.com/svn/trunk@2510 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/SkNativeGLContext.h')
-rw-r--r-- | include/gpu/SkNativeGLContext.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/gpu/SkNativeGLContext.h b/include/gpu/SkNativeGLContext.h index 512e66a3ab..f2037cfb79 100644 --- a/include/gpu/SkNativeGLContext.h +++ b/include/gpu/SkNativeGLContext.h @@ -28,6 +28,24 @@ public: virtual void makeCurrent() const SK_OVERRIDE; + class AutoContextRestore { + public: + AutoContextRestore(); + ~AutoContextRestore(); + + private: + #if defined(SK_BUILD_FOR_MAC) + AGLContext fOldAGLContext; + #elif defined(SK_BUILD_FOR_UNIX) + GLXContext fOldGLXContext; + Display* fOldDisplay; + GLXDrawable fOldDrawable; + #elif defined(SK_BUILD_FOR_WIN32) + HDC fOldHDC; + HGLRC fOldHGLRC; + #endif + }; + protected: virtual const GrGLInterface* createGLContext() SK_OVERRIDE; void destroyGLContext() SK_OVERRIDE; |