1 /* 2 * Copyright 2016 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 SKSL_GLSLCODEGENERATOR 9 #define SKSL_GLSLCODEGENERATOR 10 11 #include <string> 12 13 namespace SkSL { 14 15 enum class PrettyPrint : bool; 16 class OutputStream; 17 struct Program; 18 struct ShaderCaps; 19 20 /** Converts a Program into GLSL code. */ 21 bool ToGLSL(Program& program, const ShaderCaps* caps, OutputStream& out, PrettyPrint); 22 bool ToGLSL(Program& program, const ShaderCaps* caps, OutputStream& out); 23 bool ToGLSL(Program& program, const ShaderCaps* caps, std::string* out); 24 25 } // namespace SkSL 26 27 #endif 28