aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLParser.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-15 12:33:30 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-15 19:49:58 +0000
commit3614d9adb328ccf3fc37f8e530f5f530330e37b4 (patch)
tree9f00a406533397e0164314db2a1c4b75a7603d4e /src/sksl/SkSLParser.h
parent169f37f6c5e398e21309efa04460482e4be4c4a1 (diff)
improved performance of parsing SkSLLayout flags
BUG=skia: Change-Id: Ib0e1393fb44f5f934ad2f88fed638ef7a0fa7393 Reviewed-on: https://skia-review.googlesource.com/8463 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLParser.h')
-rw-r--r--src/sksl/SkSLParser.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sksl/SkSLParser.h b/src/sksl/SkSLParser.h
index 75532e6238..f277745925 100644
--- a/src/sksl/SkSLParser.h
+++ b/src/sksl/SkSLParser.h
@@ -10,6 +10,7 @@
#include <vector>
#include <memory>
+#include <unordered_map>
#include <unordered_set>
#include "SkSLErrorReporter.h"
#include "SkSLToken.h"
@@ -206,6 +207,20 @@ private:
Token fPushback;
SymbolTable& fTypes;
ErrorReporter& fErrors;
+ enum LayoutKey {
+ kLocation_LayoutKey,
+ kOffset_LayoutKey,
+ kBinding_LayoutKey,
+ kIndex_LayoutKey,
+ kSet_LayoutKey,
+ kBuiltin_LayoutKey,
+ kInputAttachmentIndex_LayoutKey,
+ kOriginUpperLeft_LayoutKey,
+ kOverrideCoverage_LayoutKey,
+ kBlendSupportAllEquations_LayoutKey,
+ kPushConstant_LayoutKey
+ };
+ std::unordered_map<SkString, LayoutKey> fLayoutKeys;
friend class AutoDepth;
};