diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2016-12-09 17:22:59 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-12 16:42:34 +0000 |
commit | ce33f10677630e34187b661a02161378d8304d68 (patch) | |
tree | 570afa6dc9fc971ab1b886563a04b48cfd41156b /src/sksl/SkSLIRGenerator.h | |
parent | f44703a87f532b3f593d91605d66d52c6bbc45c9 (diff) |
added sk_FragCoord support to skslc
BUG=skia:
Change-Id: If78a4d08121699f87659f0d2e35f3edbf1867401
Reviewed-on: https://skia-review.googlesource.com/5408
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLIRGenerator.h')
-rw-r--r-- | src/sksl/SkSLIRGenerator.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sksl/SkSLIRGenerator.h b/src/sksl/SkSLIRGenerator.h index ade6150089..13b20fbbcc 100644 --- a/src/sksl/SkSLIRGenerator.h +++ b/src/sksl/SkSLIRGenerator.h @@ -40,6 +40,7 @@ #include "ir/SkSLInterfaceBlock.h" #include "ir/SkSLModifiers.h" #include "ir/SkSLModifiersDeclaration.h" +#include "ir/SkSLProgram.h" #include "ir/SkSLSymbolTable.h" #include "ir/SkSLStatement.h" #include "ir/SkSLType.h" @@ -87,12 +88,14 @@ public: std::unique_ptr<ModifiersDeclaration> convertModifiersDeclaration( const ASTModifiersDeclaration& m); + Program::Inputs fInputs; + private: /** - * Prepare to compile a program. Pushes a new symbol table and installs the caps so that - * references to sk_Caps.<cap> can be resolved. + * Prepare to compile a program. Resets state, pushes a new symbol table, and installs the + * settings. */ - void start(std::unordered_map<SkString, CapValue>* caps); + void start(const Program::Settings* settings); /** * Performs cleanup after compilation is complete. @@ -153,7 +156,8 @@ private: const Context& fContext; const FunctionDeclaration* fCurrentFunction; - const std::unordered_map<SkString, CapValue>* fCapsMap; + const Program::Settings* fSettings; + std::unordered_map<SkString, CapValue> fCapsMap; std::shared_ptr<SymbolTable> fSymbolTable; int fLoopLevel; ErrorReporter& fErrors; |