• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "GrAllocator.h"
12 #include "GrGpu.h"
13 #include "gl/GrGLContext.h"
14 #include "SkSLGLSLCodeGenerator.h"
15 #include "SkTypes.h"
16 
17 std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLContext& context, GrGLenum type,
18                                             const char** skslStrings, int* lengths, int count,
19                                             const SkSL::Program::Settings& settings,
20                                             SkSL::String* glsl);
21 
22 GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx,
23                                     GrGLuint programId,
24                                     GrGLenum type,
25                                     const char* glsl,
26                                     int glslLength,
27                                     GrGpu::Stats*,
28                                     const SkSL::Program::Settings& settings);
29 
30 void GrGLPrintShader(const GrGLContext&, GrGLenum type, const char** skslStrings, int* lengths,
31                      int count, const SkSL::Program::Settings&);
32 
33 #endif
34