aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/builders/GrGLShaderStringBuilder.h
blob: c693a390ccda9d973f2e565f42eede13c6bf548c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright 2014 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GrGLShaderStringBuilder_DEFINED
#define GrGLShaderStringBuilder_DEFINED

#include "GrAllocator.h"
#include "GrGpu.h"
#include "gl/GrGLContext.h"
#include "SkSLGLSLCodeGenerator.h"
#include "SkTypes.h"

std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLContext& context, GrGLenum type,
                                            const char** skslStrings, int* lengths, int count,
                                            const SkSL::Program::Settings& settings,
                                            SkSL::String* glsl);

GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx,
                                    GrGLuint programId,
                                    GrGLenum type,
                                    const char* glsl,
                                    int glslLength,
                                    GrGpu::Stats*,
                                    const SkSL::Program::Settings& settings);

void GrGLPrintShader(const GrGLContext&, GrGLenum type, const char** skslStrings, int* lengths,
                     int count, const SkSL::Program::Settings&);

#endif