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

Unified Diff: src/sksl/ir/SkSLSymbolTable.h

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/sksl/ir/SkSLSwizzle.h ('k') | src/sksl/ir/SkSLSymbolTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/ir/SkSLSymbolTable.h
diff --git a/src/sksl/ir/SkSLSymbolTable.h b/src/sksl/ir/SkSLSymbolTable.h
index d732023ff091e01344f170221a64b0cc1cf91213..151475d6423690d3024d322c2c3968f0a21a9066 100644
--- a/src/sksl/ir/SkSLSymbolTable.h
+++ b/src/sksl/ir/SkSLSymbolTable.h
@@ -10,13 +10,11 @@
#include <memory>
#include <unordered_map>
-#include <vector>
#include "SkSLErrorReporter.h"
#include "SkSLSymbol.h"
+#include "SkSLUnresolvedFunction.h"
namespace SkSL {
-
-struct FunctionDeclaration;
/**
* Maps identifiers to symbols. Functions, in particular, are mapped to either FunctionDeclaration
@@ -31,22 +29,17 @@
: fParent(parent)
, fErrorReporter(errorReporter) {}
- const Symbol* operator[](const std::string& name);
+ std::shared_ptr<Symbol> operator[](const std::string& name);
- void add(const std::string& name, std::unique_ptr<Symbol> symbol);
-
- void addWithoutOwnership(const std::string& name, const Symbol* symbol);
-
- Symbol* takeOwnership(Symbol* s);
+ void add(const std::string& name, std::shared_ptr<Symbol> symbol);
const std::shared_ptr<SymbolTable> fParent;
private:
- static std::vector<const FunctionDeclaration*> GetFunctions(const Symbol& s);
+ static std::vector<std::shared_ptr<FunctionDeclaration>> GetFunctions(
+ const std::shared_ptr<Symbol>& s);
- std::vector<std::unique_ptr<Symbol>> fOwnedPointers;
-
- std::unordered_map<std::string, const Symbol*> fSymbols;
+ std::unordered_map<std::string, std::shared_ptr<Symbol>> fSymbols;
ErrorReporter& fErrorReporter;
};
« no previous file with comments | « src/sksl/ir/SkSLSwizzle.h ('k') | src/sksl/ir/SkSLSymbolTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698