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

Unified Diff: include/gpu/GrContextFactory.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 | « 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 eff1f5834c039566e2865375ce46f5906b071095..d78120ccb0e265682d891bd07bdde5648c64c589 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/SkGLContext.h"
+#include "gl/SkNativeGLContext.h"
#include "gl/SkNullGLContext.h"
#include "GrContext.h"
@@ -130,12 +130,12 @@
return fContexts[i].fGrContext;
}
}
- SkAutoTUnref<SkGLContext> glCtx;
+ SkAutoTUnref<SkGLContextHelper> glCtx;
SkAutoTUnref<GrContext> grCtx;
switch (type) {
case kNVPR_GLContextType: // fallthru
case kNative_GLContextType:
- glCtx.reset(SkCreatePlatformGLContext());
+ glCtx.reset(SkNEW(SkNativeGLContext));
break;
#ifdef SK_ANGLE
case kANGLE_GLContextType:
@@ -192,7 +192,7 @@
// Returns the GLContext of the given type. If it has not been created yet,
// NULL is returned instead.
- SkGLContext* getGLContext(GLContextType type) {
+ SkGLContextHelper* getGLContext(GLContextType type) {
for (int i = 0; i < fContexts.count(); ++i) {
if (fContexts[i].fType == type) {
return fContexts[i].fGLContext;
@@ -207,7 +207,7 @@
private:
struct GPUContext {
GLContextType fType;
- SkGLContext* fGLContext;
+ SkGLContextHelper* 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