Split GrGLContextInfo into GrGLContext & GrGLContextInfo
https://codereview.appspot.com/7436045/
git-svn-id: http://skia.googlecode.com/svn/trunk@7905 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h
index d425b74..3d9f1a3 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -104,7 +104,7 @@
return fContexts[i].fGrContext;
}
}
- SkAutoTUnref<SkGLContext> glCtx;
+ SkAutoTUnref<SkGLContextHelper> glCtx;
SkAutoTUnref<GrContext> grCtx;
switch (type) {
case kNative_GLContextType:
@@ -150,7 +150,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;
@@ -163,7 +163,7 @@
private:
struct GPUContext {
GLContextType fType;
- SkGLContext* fGLContext;
+ SkGLContextHelper* fGLContext;
GrContext* fGrContext;
};
SkTArray<GPUContext, true> fContexts;
diff --git a/include/gpu/gl/SkANGLEGLContext.h b/include/gpu/gl/SkANGLEGLContext.h
index 7bcf07a..63765a0 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();
diff --git a/include/gpu/gl/SkDebugGLContext.h b/include/gpu/gl/SkDebugGLContext.h
index 6e29b67..2437aae 100644
--- a/include/gpu/gl/SkDebugGLContext.h
+++ b/include/gpu/gl/SkDebugGLContext.h
@@ -8,9 +8,9 @@
#ifndef SkDebugGLContext_DEFINED
#define SkDebugGLContext_DEFINED
-#include "SkGLContext.h"
+#include "SkGLContextHelper.h"
-class SkDebugGLContext : public SkGLContext {
+class SkDebugGLContext : public SkGLContextHelper {
public:
SkDebugGLContext() {};
diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContextHelper.h
similarity index 88%
rename from include/gpu/gl/SkGLContext.h
rename to include/gpu/gl/SkGLContextHelper.h
index 43ae9cd..386a695 100644
--- a/include/gpu/gl/SkGLContext.h
+++ b/include/gpu/gl/SkGLContextHelper.h
@@ -1,12 +1,12 @@
/*
- * Copyright 2011 Google Inc.
+ * Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef SkGLContext_DEFINED
-#define SkGLContext_DEFINED
+#ifndef SkGLContextHelper_DEFINED
+#define SkGLContextHelper_DEFINED
#include "GrGLExtensions.h"
#include "GrGLInterface.h"
@@ -16,12 +16,12 @@
* Provides a GrGLInterface struct of function pointers for the context.
*/
-class SkGLContext : public SkRefCnt {
+class SkGLContextHelper : public SkRefCnt {
public:
- SK_DECLARE_INST_COUNT(SkGLContext)
+ SK_DECLARE_INST_COUNT(SkGLContextHelper)
- SkGLContext();
- virtual ~SkGLContext();
+ SkGLContextHelper();
+ virtual ~SkGLContextHelper();
/**
* Initializes the context and makes it current.
diff --git a/include/gpu/gl/SkMesaGLContext.h b/include/gpu/gl/SkMesaGLContext.h
index 14a3ca7..6470d2e 100644
--- a/include/gpu/gl/SkMesaGLContext.h
+++ b/include/gpu/gl/SkMesaGLContext.h
@@ -8,11 +8,11 @@
#ifndef SkMesaGLContext_DEFINED
#define SkMesaGLContext_DEFINED
-#include "SkGLContext.h"
+#include "SkGLContextHelper.h"
#if SK_MESA
-class SkMesaGLContext : public SkGLContext {
+class SkMesaGLContext : public SkGLContextHelper {
private:
typedef intptr_t Context;
diff --git a/include/gpu/gl/SkNativeGLContext.h b/include/gpu/gl/SkNativeGLContext.h
index 410c149..27a8f09 100644
--- a/include/gpu/gl/SkNativeGLContext.h
+++ b/include/gpu/gl/SkNativeGLContext.h
@@ -8,7 +8,7 @@
#ifndef SkNativeGLContext_DEFINED
#define SkNativeGLContext_DEFINED
-#include "SkGLContext.h"
+#include "SkGLContextHelper.h"
#if defined(SK_BUILD_FOR_MAC)
#include <OpenGL/OpenGL.h>
@@ -23,7 +23,7 @@
#include <GL/GL.h>
#endif
-class SkNativeGLContext : public SkGLContext {
+class SkNativeGLContext : public SkGLContextHelper {
public:
SkNativeGLContext();
diff --git a/include/gpu/gl/SkNullGLContext.h b/include/gpu/gl/SkNullGLContext.h
index 83213a3..4f2639c 100644
--- a/include/gpu/gl/SkNullGLContext.h
+++ b/include/gpu/gl/SkNullGLContext.h
@@ -8,9 +8,9 @@
#ifndef SkNullGLContext_DEFINED
#define SkNullGLContext_DEFINED
-#include "SkGLContext.h"
+#include "SkGLContextHelper.h"
-class SkNullGLContext : public SkGLContext {
+class SkNullGLContext : public SkGLContextHelper {
public:
SkNullGLContext() {};