aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLCompiler.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-06-27 09:56:09 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-27 14:20:05 +0000
commitccf59917d3fe7aaf59de714acfbd0596503f324f (patch)
treecc97719c47276c9dcbf0ec09effd580c4e7450dd /src/sksl/SkSLCompiler.h
parentc3aef18419c1bb16951370e11758c7ef131fa10b (diff)
sksl fragment processor support
Bug: skia: Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34 Reviewed-on: https://skia-review.googlesource.com/17843 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/sksl/SkSLCompiler.h')
-rw-r--r--src/sksl/SkSLCompiler.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/sksl/SkSLCompiler.h b/src/sksl/SkSLCompiler.h
index bc9a1964ac..2acb55958f 100644
--- a/src/sksl/SkSLCompiler.h
+++ b/src/sksl/SkSLCompiler.h
@@ -18,12 +18,16 @@
#include "SkSLErrorReporter.h"
#include "SkSLIRGenerator.h"
-#define SK_FRAGCOLOR_BUILTIN 10001
-#define SK_IN_BUILTIN 10002
-#define SK_FRAGCOORD_BUILTIN 15
-#define SK_VERTEXID_BUILTIN 5
-#define SK_CLIPDISTANCE_BUILTIN 3
-#define SK_INVOCATIONID_BUILTIN 8
+#define SK_FRAGCOLOR_BUILTIN 10001
+#define SK_IN_BUILTIN 10002
+#define SK_INCOLOR_BUILTIN 10003
+#define SK_OUTCOLOR_BUILTIN 10004
+#define SK_TRANSFORMEDCOORDS2D_BUILTIN 10005
+#define SK_TEXTURESAMPLERS_BUILTIN 10006
+#define SK_FRAGCOORD_BUILTIN 15
+#define SK_VERTEXID_BUILTIN 5
+#define SK_CLIPDISTANCE_BUILTIN 3
+#define SK_INVOCATIONID_BUILTIN 8
namespace SkSL {
@@ -54,6 +58,10 @@ public:
bool toGLSL(const Program& program, String* out);
+ bool toCPP(const Program& program, String name, OutputStream& out);
+
+ bool toH(const Program& program, String name, OutputStream& out);
+
void error(Position position, String msg) override;
String errorText();