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

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

Issue 630843002: 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
Index: include/gpu/gl/SkGLContext.h
diff --git a/include/gpu/gl/SkGLContextHelper.h b/include/gpu/gl/SkGLContext.h
similarity index 87%
rename from include/gpu/gl/SkGLContextHelper.h
rename to include/gpu/gl/SkGLContext.h
index c4d9bdf9979c4165cd67f404d708711b0f716291..c33de61a0791aa7079a66a025b7e971801d89228 100644
--- a/include/gpu/gl/SkGLContextHelper.h
+++ b/include/gpu/gl/SkGLContext.h
@@ -5,8 +5,8 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef SkGLContextHelper_DEFINED
-#define SkGLContextHelper_DEFINED
+#ifndef SkGLContext_DEFINED
+#define SkGLContext_DEFINED
#include "GrGLInterface.h"
@@ -15,12 +15,12 @@
* Provides a GrGLInterface struct of function pointers for the context.
*/
-class SK_API SkGLContextHelper : public SkRefCnt {
+class SK_API SkGLContext : public SkRefCnt {
public:
- SK_DECLARE_INST_COUNT(SkGLContextHelper)
+ SK_DECLARE_INST_COUNT(SkGLContext)
- SkGLContextHelper();
- virtual ~SkGLContextHelper();
+ SkGLContext();
+ virtual ~SkGLContext();
/**
* Initializes the context and makes it current.
@@ -81,6 +81,12 @@ private:
typedef SkRefCnt INHERITED;
};
+/** Creates platform-dependent native GL context object
+ * Note: This should be implemented by the embedder to create
+ * embedder-customized SkGLContext class.
+ */
+SK_API SkGLContext* SkCreateGLContext();
+
/**
* Helper macros for using the GL context through the GrGLInterface. Example:
* SK_GL(glCtx, GenTextures(1, &texID));

Powered by Google App Engine
This is Rietveld 408576698