1 | /* |
2 | * Copyright 2014 Google Inc. |
3 | * |
4 | * Use of this source code is governed by a BSD-style license that can be |
5 | * found in the LICENSE file. |
6 | */ |
7 | |
8 | #ifndef GrGLShaderStringBuilder_DEFINED |
9 | #define GrGLShaderStringBuilder_DEFINED |
10 | |
11 | #include "include/core/SkTypes.h" |
12 | #include "include/gpu/GrContextOptions.h" |
13 | #include "src/gpu/GrGpu.h" |
14 | #include "src/gpu/gl/GrGLContext.h" |
15 | #include "src/sksl/SkSLGLSLCodeGenerator.h" |
16 | |
17 | std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLContext& context, |
18 | SkSL::Program::Kind programKind, |
19 | const SkSL::String& sksl, |
20 | const SkSL::Program::Settings& settings, |
21 | SkSL::String* glsl, |
22 | GrContextOptions::ShaderErrorHandler* errorHandler); |
23 | |
24 | GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx, |
25 | GrGLuint programId, |
26 | GrGLenum type, |
27 | const SkSL::String& glsl, |
28 | GrGpu::Stats*, |
29 | GrContextOptions::ShaderErrorHandler* errorHandler); |
30 | |
31 | #endif |
32 | |