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) { |