diff options
author | 2018-04-24 13:06:09 -0400 | |
---|---|---|
committer | 2018-04-25 16:53:27 +0000 | |
commit | 3c6ae62e0f9faeab0242fca2d19d61e64a7c8a6e (patch) | |
tree | 68e1ebf040d2027349fc702ab7bf384d88a79ea3 /src/sksl/SkSLIRGenerator.h | |
parent | f8f1839cc8ab08657ab4c6419726af3d20da4666 (diff) |
cache SkSL headers
This reduces the cost of successive shader compilations by caching the
results of compiling SkSL's headers.
Bug: skia:
Change-Id: If7fc21a9877021c4025ad99dd0981523a25855e0
Reviewed-on: https://skia-review.googlesource.com/123422
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLIRGenerator.h')
-rw-r--r-- | src/sksl/SkSLIRGenerator.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sksl/SkSLIRGenerator.h b/src/sksl/SkSLIRGenerator.h index c78c195c0b..2a52e04b54 100644 --- a/src/sksl/SkSLIRGenerator.h +++ b/src/sksl/SkSLIRGenerator.h @@ -86,7 +86,8 @@ private: * Prepare to compile a program. Resets state, pushes a new symbol table, and installs the * settings. */ - void start(const Program::Settings* settings); + void start(const Program::Settings* settings, + std::vector<std::unique_ptr<ProgramElement>>* inherited); /** * Performs cleanup after compilation is complete. @@ -182,7 +183,7 @@ private: ErrorReporter& fErrors; int fInvocations; std::vector<std::unique_ptr<ProgramElement>>* fProgramElements; - Variable* fSkPerVertex; + const Variable* fSkPerVertex = nullptr; Variable* fRTAdjust; Variable* fRTAdjustInterfaceBlock; int fRTAdjustFieldIndex; |