Made SkSL DSL into public API
In addition to the unsurprising changes to eliminate references to
src/, we also had to tighten up some C++17-isms as they are not
permitted in public headers.
Change-Id: Ie5005a33d7a135e69fb66beca5e7a5f960dbd453
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378496
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/dsl/priv/DSLWriter.h b/src/sksl/dsl/priv/DSLWriter.h
index 7f3f988..fcb9936 100644
--- a/src/sksl/dsl/priv/DSLWriter.h
+++ b/src/sksl/dsl/priv/DSLWriter.h
@@ -8,17 +8,17 @@
#ifndef SKSL_DSLWRITER
#define SKSL_DSLWRITER
+#include "include/private/SkSLModifiers.h"
+#include "include/sksl/DSLExpression.h"
+#include "include/sksl/DSLStatement.h"
#include "src/sksl/SkSLMangler.h"
#include "src/sksl/SkSLOperators.h"
-#include "src/sksl/dsl/DSLExpression.h"
-#include "src/sksl/dsl/DSLStatement.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLStatement.h"
#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
#endif // !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
-
#include <stack>
class AutoDSLContext;
@@ -28,8 +28,10 @@
class Compiler;
class Context;
class IRGenerator;
+class ProgramElement;
class SymbolTable;
class Type;
+class Variable;
namespace dsl {
@@ -127,6 +129,9 @@
static GrGLSLUniformHandler::UniformHandle VarUniformHandle(const DSLVar& var);
#endif // !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
+ static std::unique_ptr<SkSL::Expression> Call(const FunctionDeclaration& function,
+ ExpressionArray arguments);
+
/**
* Reports an error if the argument is null. Returns its argument unmodified.
*/
@@ -155,8 +160,6 @@
ExpressionArray caseValues,
SkTArray<SkSL::StatementArray> caseStatements);
- static void Ignore(std::unique_ptr<SkSL::Expression>&) {}
-
/**
* Sets the ErrorHandler associated with the current thread. This object will be notified when
* any DSL errors occur. With a null ErrorHandler (the default), any errors will be dumped to