Flutter Engine
The Flutter Engine
PipelineUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
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 skgpu_PipelineUtils_DEFINED
9#define skgpu_PipelineUtils_DEFINED
10
11#include <cstdint>
12#include <string>
13
14namespace SkSL {
15
16enum class ProgramKind : int8_t;
17struct Program;
18struct ProgramInterface;
19struct ProgramSettings;
20struct ShaderCaps;
21
22} // namespace SkSL
23
24namespace skgpu {
25
26class ShaderErrorHandler;
27
28/** Wrapper for the SkSL compiler with useful logging and error handling. */
29bool SkSLToBackend(const SkSL::ShaderCaps* caps,
30 bool (*toBackend)(SkSL::Program&, const SkSL::ShaderCaps*, std::string*),
31 const char* backendLabel,
32 const std::string& sksl,
35 std::string* output,
36 SkSL::ProgramInterface* outInterface,
37 ShaderErrorHandler* errorHandler);
38
39} // namespace skgpu
40
41#endif // skgpu_PipelineUtils_DEFINED
string programKind
Definition: minify_sksl.py:40
Definition: GpuTools.h:21
bool SkSLToBackend(const SkSL::ShaderCaps *caps, bool(*toBackend)(SkSL::Program &, const SkSL::ShaderCaps *, std::string *), const char *backendLabel, const std::string &sksl, SkSL::ProgramKind programKind, const SkSL::ProgramSettings &settings, std::string *output, SkSL::ProgramInterface *outInterface, ShaderErrorHandler *errorHandler)