#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkTArray.h"
#include "src/base/SkEnumBitMask.h"
#include "src/core/SkTHash.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLDefines.h"
#include "src/sksl/SkSLIntrinsicList.h"
#include "src/sksl/SkSLModule.h"
#include "src/sksl/SkSLOperator.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLString.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/analysis/SkSLSpecialization.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLChildCall.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLIRNode.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLModifierFlags.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLProgramElement.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLStatement.h"
#include "src/sksl/ir/SkSLStructDefinition.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include "src/utils/SkBitSet.h"
#include <functional>
#include <memory>
#include <string_view>
#include <utility>
usingnamespaceskia_private;
namespace SkSL {
namespace PipelineStage {
class PipelineStageCodeGenerator { … };
void PipelineStageCodeGenerator::write(std::string_view s) { … }
void PipelineStageCodeGenerator::writeLine(std::string_view s) { … }
void PipelineStageCodeGenerator::writeChildCall(const ChildCall& c) { … }
void PipelineStageCodeGenerator::writeFunctionCall(const FunctionCall& c) { … }
void PipelineStageCodeGenerator::writeVariableReference(const VariableReference& ref) { … }
void PipelineStageCodeGenerator::writeIfStatement(const IfStatement& stmt) { … }
void PipelineStageCodeGenerator::writeReturnStatement(const ReturnStatement& r) { … }
void PipelineStageCodeGenerator::writeSwitchStatement(const SwitchStatement& s) { … }
std::string PipelineStageCodeGenerator::functionName(const FunctionDeclaration& decl,
Analysis::SpecializationIndex specIndex) { … }
void PipelineStageCodeGenerator::writeFunction(const FunctionDefinition& f) { … }
std::string PipelineStageCodeGenerator::functionDeclaration(const FunctionDeclaration& decl) { … }
void PipelineStageCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& decl) { … }
void PipelineStageCodeGenerator::forEachSpecialization(const FunctionDeclaration& decl,
const std::function<void()>& fn) { … }
void PipelineStageCodeGenerator::writeGlobalVarDeclaration(const GlobalVarDeclaration& g) { … }
void PipelineStageCodeGenerator::writeStructDefinition(const StructDefinition& s) { … }
void PipelineStageCodeGenerator::writeProgramElementFirstPass(const ProgramElement& e) { … }
void PipelineStageCodeGenerator::writeProgramElementSecondPass(const ProgramElement& e) { … }
std::string PipelineStageCodeGenerator::typeName(const Type& raw) { … }
void PipelineStageCodeGenerator::writeType(const Type& type) { … }
void PipelineStageCodeGenerator::writeExpression(const Expression& expr,
Precedence parentPrecedence) { … }
void PipelineStageCodeGenerator::writeAnyConstructor(const AnyConstructor& c,
Precedence parentPrecedence) { … }
void PipelineStageCodeGenerator::writeIndexExpression(const IndexExpression& expr) { … }
void PipelineStageCodeGenerator::writeFieldAccess(const FieldAccess& f) { … }
void PipelineStageCodeGenerator::writeSwizzle(const Swizzle& swizzle) { … }
void PipelineStageCodeGenerator::writeBinaryExpression(const BinaryExpression& b,
Precedence parentPrecedence) { … }
void PipelineStageCodeGenerator::writeTernaryExpression(const TernaryExpression& t,
Precedence parentPrecedence) { … }
void PipelineStageCodeGenerator::writePrefixExpression(const PrefixExpression& p,
Precedence parentPrecedence) { … }
void PipelineStageCodeGenerator::writePostfixExpression(const PostfixExpression& p,
Precedence parentPrecedence) { … }
std::string PipelineStageCodeGenerator::modifierString(ModifierFlags flags) { … }
std::string PipelineStageCodeGenerator::typedVariable(const Type& type, std::string_view name) { … }
void PipelineStageCodeGenerator::writeVarDeclaration(const VarDeclaration& var) { … }
void PipelineStageCodeGenerator::writeStatement(const Statement& s) { … }
void PipelineStageCodeGenerator::writeBlock(const Block& b) { … }
void PipelineStageCodeGenerator::writeDoStatement(const DoStatement& d) { … }
void PipelineStageCodeGenerator::writeForStatement(const ForStatement& f) { … }
void PipelineStageCodeGenerator::generateCode() { … }
void ConvertProgram(const Program& program,
const char* sampleCoords,
const char* inputColor,
const char* destColor,
Callbacks* callbacks) { … }
}
}