| 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/GrTAllocator.h" | 
|---|
| 15 | #include "src/gpu/gl/GrGLContext.h" | 
|---|
| 16 | #include "src/sksl/SkSLGLSLCodeGenerator.h" | 
|---|
| 17 |  | 
|---|
| 18 | std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLContext& context, | 
|---|
| 19 | SkSL::Program::Kind programKind, | 
|---|
| 20 | const SkSL::String& sksl, | 
|---|
| 21 | const SkSL::Program::Settings& settings, | 
|---|
| 22 | SkSL::String* glsl, | 
|---|
| 23 | GrContextOptions::ShaderErrorHandler* errorHandler); | 
|---|
| 24 |  | 
|---|
| 25 | GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx, | 
|---|
| 26 | GrGLuint programId, | 
|---|
| 27 | GrGLenum type, | 
|---|
| 28 | const SkSL::String& glsl, | 
|---|
| 29 | GrGpu::Stats*, | 
|---|
| 30 | GrContextOptions::ShaderErrorHandler* errorHandler); | 
|---|
| 31 |  | 
|---|
| 32 | #endif | 
|---|
| 33 |  | 
|---|