aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLContext.h
diff options
context:
space:
mode:
authorGravatar ethannicholas <ethannicholas@google.com>2016-09-12 08:50:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-12 08:50:13 -0700
commit9b0fe3d125f237d9884732a48414fa85fc71b4e3 (patch)
treebf5470aacb44419cc3f5df2eded4f170be5a532a /src/gpu/gl/GrGLContext.h
parentd99858ad46ca2c3b5c38061be8b006b25d24c6e0 (diff)
Turned on SkSL->GLSL compiler
Diffstat (limited to 'src/gpu/gl/GrGLContext.h')
-rw-r--r--src/gpu/gl/GrGLContext.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h
index 6016f6859a..8a56535887 100644
--- a/src/gpu/gl/GrGLContext.h
+++ b/src/gpu/gl/GrGLContext.h
@@ -15,6 +15,9 @@
#include "GrGLUtil.h"
struct GrContextOptions;
+namespace SkSL {
+ class Compiler;
+}
/**
* Encapsulates information about an OpenGL context including the OpenGL
@@ -39,6 +42,8 @@ public:
const GrGLExtensions& extensions() const { return fInterface->fExtensions; }
+ virtual ~GrGLContextInfo() {}
+
protected:
struct ConstructorArgs {
const GrGLInterface* fInterface;
@@ -64,7 +69,7 @@ protected:
};
/**
- * Extension of GrGLContextInfo that also provides access to GrGLInterface.
+ * Extension of GrGLContextInfo that also provides access to GrGLInterface and SkSL::Compiler.
*/
class GrGLContext : public GrGLContextInfo {
public:
@@ -76,8 +81,16 @@ public:
const GrGLInterface* interface() const { return fInterface; }
+ SkSL::Compiler* compiler();
+
+ ~GrGLContext() override;
+
private:
- GrGLContext(const ConstructorArgs& args) : INHERITED(args) {}
+ GrGLContext(const ConstructorArgs& args)
+ : INHERITED(args)
+ , fCompiler(nullptr) {}
+
+ SkSL::Compiler* fCompiler;
typedef GrGLContextInfo INHERITED;
};