Index: src/gpu/gl/GrGLContext.cpp |
diff --git a/src/gpu/gl/GrGLContext.cpp b/src/gpu/gl/GrGLContext.cpp |
index 9e70b472c5379535f5c02bd6b35e4232fd30e7a4..2126314a7be8f677b7fea1d6b9a1fa19d4b20c39 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() const { |
+ if (!fCompiler) { |
+ fCompiler = new SkSL::Compiler(); |
+ } |
+ return fCompiler; |
+} |
+ |
GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) { |
fInterface.reset(SkRef(args.fInterface)); |
fGLVersion = args.fGLVersion; |