constexpr int SK_FRAGCOLOR_BUILTIN = 10001;
constexpr int SK_LASTFRAGCOLOR_BUILTIN = 10008;
constexpr int SK_SECONDARYFRAGCOLOR_BUILTIN = 10012;
constexpr int SK_FRAGCOORD_BUILTIN = 15;
constexpr int SK_CLOCKWISE_BUILTIN = 17;
constexpr int SK_SAMPLEMASKIN_BUILTIN = 20;
constexpr int SK_SAMPLEMASK_BUILTIN = 10020;
constexpr int SK_VERTEXID_BUILTIN = 42;
constexpr int SK_INSTANCEID_BUILTIN = 43;
constexpr int SK_POSITION_BUILTIN = 0;
constexpr int SK_POINTSIZE_BUILTIN = 1;
constexpr int SK_NUMWORKGROUPS_BUILTIN = 24;
constexpr int SK_WORKGROUPID_BUILTIN = 26;
constexpr int SK_LOCALINVOCATIONID_BUILTIN = 27;
constexpr int SK_GLOBALINVOCATIONID_BUILTIN = 28;
constexpr int SK_LOCALINVOCATIONINDEX_BUILTIN = 29;
namespace SkSL {
class Inliner; struct Module; enumclass ModuleType : int8_t; class Pool; struct ProgramConfig; class ProgramUsage; enumclass ProgramKind : int8_t; struct Program; class ProgramElement; struct ProgramSettings; class SymbolTable;
/** Optimize a module at minification time, before writing it out. */ bool optimizeModuleBeforeMinifying(ProgramKind kind, Module& module, bool shrinkSymbols);
/** Run the inliner on a program which was compiled earlier (with inlining turned off). */ void runInliner(Program& program);
private: class CompilerErrorReporter : public ErrorReporter {
public: explicit CompilerErrorReporter(Compiler* compiler) : fCompiler(*compiler) {}
void handleError(std::string_view msg, Position pos) override {
fCompiler.handleError(msg, pos);
}
private:
Compiler& fCompiler;
};
/** Updates ProgramSettings to eliminate contradictions and to honor the ProgramKind. */ staticvoid FinalizeSettings(ProgramSettings* settings, ProgramKind kind);
/** Prepares the Context for compilation of a program or module. */ void initializeContext(const SkSL::Module* module,
ProgramKind kind,
ProgramSettings settings,
std::string_view source,
ModuleType moduleType);
/** Cleans up the Context post-compilation. */ void cleanupContext();
/** Optimize every function in the program. */ bool optimize(Program& program);
/** Performs final checks to confirm that a fully-assembled/optimized is valid. */ bool finalize(Program& program);
/** Optimize a module at Skia runtime, after loading it. */ bool optimizeModuleAfterLoading(ProgramKind kind, Module& module);
/** Flattens out function calls when it is safe to do so. */ bool runInliner(Inliner* inliner, const std::vector<std::unique_ptr<ProgramElement>>& elements,
SymbolTable* symbols,
ProgramUsage* usage);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.