Index: src/sksl/ir/SkSLSymbolTable.cpp |
diff --git a/src/sksl/ir/SkSLSymbolTable.cpp b/src/sksl/ir/SkSLSymbolTable.cpp |
index 9d8c0063c555fd43064dccbd0d79d0468fcda7fe..6d8e9a7ea62cf5a113165be9fa3de2c2105eeccb 100644 |
--- a/src/sksl/ir/SkSLSymbolTable.cpp |
+++ b/src/sksl/ir/SkSLSymbolTable.cpp |
@@ -97,4 +97,22 @@ void SymbolTable::addWithoutOwnership(const std::string& name, const Symbol* sym |
} |
} |
+ |
+void SymbolTable::markAllFunctionsBuiltin() { |
+ for (const auto& pair : fSymbols) { |
+ switch (pair.second->fKind) { |
+ case Symbol::kFunctionDeclaration_Kind: |
+ ((FunctionDeclaration&) *pair.second).fBuiltin = true; |
+ break; |
+ case Symbol::kUnresolvedFunction_Kind: |
+ for (auto& f : ((UnresolvedFunction&) *pair.second).fFunctions) { |
+ ((FunctionDeclaration*) f)->fBuiltin = true; |
+ } |
+ break; |
+ default: |
+ break; |
+ } |
+ } |
+} |
+ |
} // namespace |