Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: include/gpu/gl/SkANGLEGLContext.h

Issue 639793002: Revert of Make the Sk GL context class an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContextFactory.h ('k') | include/gpu/gl/SkDebugGLContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/gl/SkANGLEGLContext.h
diff --git a/include/gpu/gl/SkANGLEGLContext.h b/include/gpu/gl/SkANGLEGLContext.h
index 18cdbdb213a71ae6a7c579d9e66e8654ce1dd1a9..c5f62ff3ce85461a50305155f9c438bea700049d 100644
--- a/include/gpu/gl/SkANGLEGLContext.h
+++ b/include/gpu/gl/SkANGLEGLContext.h
@@ -10,12 +10,12 @@
#if SK_ANGLE
-#include "SkGLContext.h"
+#include "SkGLContextHelper.h"
#include <GLES2/gl2.h>
#include <EGL/egl.h>
-class SkANGLEGLContext : public SkGLContext {
+class SkANGLEGLContext : public SkGLContextHelper {
public:
SkANGLEGLContext();
@@ -23,6 +23,17 @@
virtual void makeCurrent() const SK_OVERRIDE;
virtual void swapBuffers() const SK_OVERRIDE;
+
+ class AutoContextRestore {
+ public:
+ AutoContextRestore();
+ ~AutoContextRestore();
+
+ private:
+ EGLContext fOldEGLContext;
+ EGLDisplay fOldDisplay;
+ EGLSurface fOldSurface;
+ };
protected:
virtual const GrGLInterface* createGLContext(
« no previous file with comments | « include/gpu/GrContextFactory.h ('k') | include/gpu/gl/SkDebugGLContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698