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_METALCODEGENERATOR 9 #define SKSL_METALCODEGENERATOR 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 /** 21 * Converts a Program into Metal code. 22 */ 23 bool ToMetal(Program& program, const ShaderCaps* caps, OutputStream& out, PrettyPrint); 24 bool ToMetal(Program& program, const ShaderCaps* caps, OutputStream& out); 25 bool ToMetal(Program& program, const ShaderCaps* caps, std::string* out); 26 27 } // namespace SkSL 28 29 #endif 30