Index: src/gpu/gl/GrGLContext.cpp |
diff --git a/src/gpu/gl/GrGLContext.cpp b/src/gpu/gl/GrGLContext.cpp |
index 9e70b472c5379535f5c02bd6b35e4232fd30e7a4..93f14cfc678e6c28176b2ff36457535834a968d3 100644 |
--- a/src/gpu/gl/GrGLContext.cpp |
+++ b/src/gpu/gl/GrGLContext.cpp |
@@ -7,6 +7,7 @@ |
#include "GrGLContext.h" |
#include "GrGLGLSL.h" |
+#include "SkSLCompiler.h" |
//////////////////////////////////////////////////////////////////////////////// |
@@ -63,6 +64,17 @@ GrGLContext* GrGLContext::Create(const GrGLInterface* interface, const GrContext |
return new GrGLContext(args); |
} |
+GrGLContext::~GrGLContext() { |
+ delete fCompiler; |
+} |
+ |
+SkSL::Compiler* GrGLContext::compiler() { |
+ if (!fCompiler) { |
+ fCompiler = new SkSL::Compiler(); |
+ } |
+ return fCompiler; |
+} |
+ |
GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) { |
fInterface.reset(SkRef(args.fInterface)); |
fGLVersion = args.fGLVersion; |