Recommit r2510 now that mac build bot issue has been fixed.



git-svn-id: http://skia.googlecode.com/svn/trunk@2521 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/SkNativeGLContext.h b/include/gpu/SkNativeGLContext.h
index 512e66a..f2037cf 100644
--- a/include/gpu/SkNativeGLContext.h
+++ b/include/gpu/SkNativeGLContext.h
@@ -28,6 +28,24 @@
 
     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;