aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/SkMesaGLContext.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-10-20 21:09:45 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-10-20 21:09:45 +0000
commitd47fafe05743d61958397bcf7a4b2bf66d778e1d (patch)
treefac9722ac2921f86840813c7d0792be28851a7ca /include/gpu/SkMesaGLContext.h
parentffa11bbbedd201899eb93bf05089c511f53d5c2a (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/SkMesaGLContext.h')
-rw-r--r--include/gpu/SkMesaGLContext.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/gpu/SkMesaGLContext.h b/include/gpu/SkMesaGLContext.h
index 4351f66f33..b7578f367b 100644
--- a/include/gpu/SkMesaGLContext.h
+++ b/include/gpu/SkMesaGLContext.h
@@ -13,6 +13,9 @@
#if SK_MESA
class SkMesaGLContext : public SkGLContext {
+private:
+ typedef intptr_t Context;
+
public:
SkMesaGLContext();
@@ -20,16 +23,28 @@ public:
virtual void makeCurrent() const SK_OVERRIDE;
+ class AutoContextRestore {
+ public:
+ AutoContextRestore();
+ ~AutoContextRestore();
+
+ private:
+ Context fOldContext;
+ GLint fOldWidth;
+ GLint fOldHeight;
+ GLint fOldFormat;
+ void* fOldImage;
+ };
+
protected:
virtual const GrGLInterface* createGLContext() SK_OVERRIDE;
void destroyGLContext() SK_OVERRIDE;
private:
- typedef intptr_t Context;
Context fContext;
GrGLubyte *fImage;
};
#endif
-#endif \ No newline at end of file
+#endif