aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLCompiler.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-24 14:52:02 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-24 14:52:11 +0000
commitfe8da17f5333a0134a01b9fe4d7f67e3df949c61 (patch)
treebcffa405e17967214abcc9efcf75ede8d9cff689 /src/sksl/SkSLCompiler.cpp
parent3a08c65b9612dd845623f0e880fd68b3be75fceb (diff)
Revert "Revert "converted vertex shaders to device coords""
This reverts commit 29b3434e48ca41672266ac40f5b9e8f8a0405cb5. Reason for revert: The Chrome perf regression is suspect & the Nexus 5 is broken w/o this CL. Original change's description: > Revert "converted vertex shaders to device coords" > > This reverts commit e7e81c15c144b8133f696d0744ed9f7e8d06e936. > > Reason for revert: Chrome perf regressions > > Bug: skia: > Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473 > Reviewed-on: https://skia-review.googlesource.com/99040 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=csmartdalton@google.com,ethannicholas@google.com Change-Id: Iff3c9fce65beeca16028ae59d4d08b1413b90530 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/99241 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/sksl/SkSLCompiler.cpp')
-rw-r--r--src/sksl/SkSLCompiler.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index bf321c8e1e..7589da98ee 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -200,7 +200,8 @@ Compiler::Compiler(Flags flags)
fIRGenerator->fSymbolTable->add(skArgsName, std::unique_ptr<Symbol>(skArgs));
std::vector<std::unique_ptr<ProgramElement>> ignored;
- fIRGenerator->convertProgram(SKSL_INCLUDE, strlen(SKSL_INCLUDE), *fTypes, &ignored);
+ fIRGenerator->convertProgram(Program::kFragment_Kind, SKSL_INCLUDE, strlen(SKSL_INCLUDE),
+ *fTypes, &ignored);
fIRGenerator->fSymbolTable->markAllFunctionsBuiltin();
if (fErrorCount) {
printf("Unexpected errors: %s\n", fErrorText.c_str());
@@ -1164,19 +1165,19 @@ std::unique_ptr<Program> Compiler::convertProgram(Program::Kind kind, String tex
std::vector<std::unique_ptr<ProgramElement>> elements;
switch (kind) {
case Program::kVertex_Kind:
- fIRGenerator->convertProgram(SKSL_VERT_INCLUDE, strlen(SKSL_VERT_INCLUDE), *fTypes,
- &elements);
+ fIRGenerator->convertProgram(kind, SKSL_VERT_INCLUDE, strlen(SKSL_VERT_INCLUDE),
+ *fTypes, &elements);
break;
case Program::kFragment_Kind:
- fIRGenerator->convertProgram(SKSL_FRAG_INCLUDE, strlen(SKSL_FRAG_INCLUDE), *fTypes,
- &elements);
+ fIRGenerator->convertProgram(kind, SKSL_FRAG_INCLUDE, strlen(SKSL_FRAG_INCLUDE),
+ *fTypes, &elements);
break;
case Program::kGeometry_Kind:
- fIRGenerator->convertProgram(SKSL_GEOM_INCLUDE, strlen(SKSL_GEOM_INCLUDE), *fTypes,
- &elements);
+ fIRGenerator->convertProgram(kind, SKSL_GEOM_INCLUDE, strlen(SKSL_GEOM_INCLUDE),
+ *fTypes, &elements);
break;
case Program::kFragmentProcessor_Kind:
- fIRGenerator->convertProgram(SKSL_FP_INCLUDE, strlen(SKSL_FP_INCLUDE), *fTypes,
+ fIRGenerator->convertProgram(kind, SKSL_FP_INCLUDE, strlen(SKSL_FP_INCLUDE), *fTypes,
&elements);
break;
}
@@ -1188,7 +1189,7 @@ std::unique_ptr<Program> Compiler::convertProgram(Program::Kind kind, String tex
}
std::unique_ptr<String> textPtr(new String(std::move(text)));
fSource = textPtr.get();
- fIRGenerator->convertProgram(textPtr->c_str(), textPtr->size(), *fTypes, &elements);
+ fIRGenerator->convertProgram(kind, textPtr->c_str(), textPtr->size(), *fTypes, &elements);
if (!fErrorCount) {
for (auto& element : elements) {
if (element->fKind == ProgramElement::kFunction_Kind) {