diff options
author | Timothy Liang <timliang@google.com> | 2018-07-23 16:46:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-23 21:10:24 +0000 |
commit | b8eeb808d84f7892fad9ce8ff6ce62c7fcacb217 (patch) | |
tree | 44663e44c317193cdc63400b591ae89270d634b0 /src/sksl/SkSLCompiler.cpp | |
parent | 1c4668d002323ddcacfd6ecd20c1b844fc953ecb (diff) |
added integration for non-moltenvk use of SkSLC MSL generator
Bug: skia:
Change-Id: I4aa230fa25fccde0345b84384d9f7b1bb3045a73
Reviewed-on: https://skia-review.googlesource.com/142686
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLCompiler.cpp')
-rw-r--r-- | src/sksl/SkSLCompiler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp index feaafebc79..d90a295986 100644 --- a/src/sksl/SkSLCompiler.cpp +++ b/src/sksl/SkSLCompiler.cpp @@ -1347,6 +1347,15 @@ bool Compiler::toMetal(const Program& program, OutputStream& out) { return result; } +bool Compiler::toMetal(const Program& program, String* out) { + StringStream buffer; + bool result = this->toMetal(program, buffer); + if (result) { + *out = buffer.str(); + } + return result; +} + bool Compiler::toCPP(const Program& program, String name, OutputStream& out) { fSource = program.fSource.get(); CPPCodeGenerator cg(fContext.get(), &program, this, name, &out); |