summaryrefslogtreecommitdiffstats
path: root/gfx/skia/skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/skia/skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h')
-rw-r--r--gfx/skia/skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gfx/skia/skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h b/gfx/skia/skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h
new file mode 100644
index 0000000000..c49a8d571d
--- /dev/null
+++ b/gfx/skia/skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SKSL_RASTERPIPELINECODEGENERATOR
+#define SKSL_RASTERPIPELINECODEGENERATOR
+
+#include "include/core/SkTypes.h"
+#include <memory>
+
+namespace SkSL {
+
+class FunctionDefinition;
+struct Program;
+class SkRPDebugTrace;
+namespace RP { class Program; }
+
+// Convert 'function' to Raster Pipeline stages, for use by blends, shaders, and color filters.
+// The arguments to the function are passed in registers:
+// -- coordinates in src.rg for shaders
+// -- color in src.rgba for color filters
+// -- src/dst in src.rgba and dst.rgba for blenders
+std::unique_ptr<RP::Program> MakeRasterPipelineProgram(const Program& program,
+ const FunctionDefinition& function,
+ SkRPDebugTrace* debugTrace = nullptr);
+
+} // namespace SkSL
+
+#endif