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

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: fix android link problem and ios compile problem 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/gl/SkDebugGLContext.h ('k') | include/gpu/gl/SkGLContextHelper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/gl/SkGLContext.h
diff --git a/include/gpu/gl/SkGLContextHelper.h b/include/gpu/gl/SkGLContext.h
similarity index 84%
rename from include/gpu/gl/SkGLContextHelper.h
rename to include/gpu/gl/SkGLContext.h
index c4d9bdf9979c4165cd67f404d708711b0f716291..83c9146c9b48ffebfcebd987d6dd6a4e58ee450e 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,14 @@ private:
typedef SkRefCnt INHERITED;
};
+/** Creates platform-dependent GL context object
+ * Note: If Skia embedder needs a custom GL context that sets up the GL
+ * interface, this function should be implemented by the embedder.
+ * Otherwise, the default implementation for the platform should be compiled in
+ * the library.
+ */
+SK_API SkGLContext* SkCreatePlatformGLContext();
+
/**
* Helper macros for using the GL context through the GrGLInterface. Example:
* SK_GL(glCtx, GenTextures(1, &texID));
« no previous file with comments | « include/gpu/gl/SkDebugGLContext.h ('k') | include/gpu/gl/SkGLContextHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698