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

Unified Diff: include/gpu/GrContextFactory.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 | « gyp/public_headers.gypi ('k') | include/gpu/gl/SkANGLEGLContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContextFactory.h
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h
index d78120ccb0e265682d891bd07bdde5648c64c589..eff1f5834c039566e2865375ce46f5906b071095 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -15,7 +15,7 @@
#if SK_MESA
#include "gl/SkMesaGLContext.h"
#endif
-#include "gl/SkNativeGLContext.h"
+#include "gl/SkGLContext.h"
#include "gl/SkNullGLContext.h"
#include "GrContext.h"
@@ -130,12 +130,12 @@ public:
return fContexts[i].fGrContext;
}
}
- SkAutoTUnref<SkGLContextHelper> glCtx;
+ SkAutoTUnref<SkGLContext> glCtx;
SkAutoTUnref<GrContext> grCtx;
switch (type) {
case kNVPR_GLContextType: // fallthru
case kNative_GLContextType:
- glCtx.reset(SkNEW(SkNativeGLContext));
+ glCtx.reset(SkCreatePlatformGLContext());
break;
#ifdef SK_ANGLE
case kANGLE_GLContextType:
@@ -192,7 +192,7 @@ public:
// Returns the GLContext of the given type. If it has not been created yet,
// NULL is returned instead.
- SkGLContextHelper* getGLContext(GLContextType type) {
+ SkGLContext* getGLContext(GLContextType type) {
for (int i = 0; i < fContexts.count(); ++i) {
if (fContexts[i].fType == type) {
return fContexts[i].fGLContext;
@@ -207,7 +207,7 @@ public:
private:
struct GPUContext {
GLContextType fType;
- SkGLContextHelper* fGLContext;
+ SkGLContext* fGLContext;
GrContext* fGrContext;
};
SkTArray<GPUContext, true> fContexts;
« no previous file with comments | « gyp/public_headers.gypi ('k') | include/gpu/gl/SkANGLEGLContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698