Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1256)

Unified Diff: src/sksl/SkSLCompiler.cpp

Issue 2143323003: Revert of SkSL performance improvements (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateBuilder.cpp ('k') | src/sksl/SkSLIRGenerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/SkSLCompiler.cpp
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index ff125f8fdc0a7760e8a809cf2f92332dfd4104ba..2b4adc1026307053f38fae0480708607ad7c4f46 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -43,7 +43,7 @@
auto symbols = std::shared_ptr<SymbolTable>(new SymbolTable(types, *this));
fIRGenerator = new IRGenerator(symbols, *this);
fTypes = types;
- #define ADD_TYPE(t) types->addWithoutOwnership(k ## t ## _Type->fName, k ## t ## _Type)
+ #define ADD_TYPE(t) types->add(k ## t ## _Type->fName, k ## t ## _Type)
ADD_TYPE(Void);
ADD_TYPE(Float);
ADD_TYPE(Vec2);
@@ -185,21 +185,19 @@
fErrorText = "";
fErrorCount = 0;
fIRGenerator->pushSymbolTable();
- std::vector<std::unique_ptr<ProgramElement>> elements;
+ std::vector<std::unique_ptr<ProgramElement>> result;
switch (kind) {
case Program::kVertex_Kind:
- this->internalConvertProgram(SKSL_VERT_INCLUDE, &elements);
+ this->internalConvertProgram(SKSL_VERT_INCLUDE, &result);
break;
case Program::kFragment_Kind:
- this->internalConvertProgram(SKSL_FRAG_INCLUDE, &elements);
+ this->internalConvertProgram(SKSL_FRAG_INCLUDE, &result);
break;
}
- this->internalConvertProgram(text, &elements);
- auto result = std::unique_ptr<Program>(new Program(kind, std::move(elements),
- fIRGenerator->fSymbolTable));;
+ this->internalConvertProgram(text, &result);
fIRGenerator->popSymbolTable();
this->writeErrorCount();
- return result;
+ return std::unique_ptr<Program>(new Program(kind, std::move(result)));;
}
void Compiler::error(Position position, std::string msg) {
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateBuilder.cpp ('k') | src/sksl/SkSLIRGenerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698