diff options
author | 2017-02-16 14:49:57 -0500 | |
---|---|---|
committer | 2017-02-16 20:27:43 +0000 | |
commit | 50afc1765511a8d4850fe97aacf8714b609bfd5a (patch) | |
tree | fd7b6874542c53463b856f3ff8d1258dc389a21d /src/sksl/ast/SkSLASTType.h | |
parent | 3bf12c60e265b09f282c9cc0fea1219b0b1b1088 (diff) |
Fixed a couple of spots where sksl didn't have proper array support.
vec2 x[3] worked, but vec2[3] x didn't. Interface blocks also did
not work with array sizes.
BUG=skia:
Change-Id: I45b424891db46804f1e3c1f4793470b7b501a6de
Reviewed-on: https://skia-review.googlesource.com/8523
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'src/sksl/ast/SkSLASTType.h')
-rw-r--r-- | src/sksl/ast/SkSLASTType.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sksl/ast/SkSLASTType.h b/src/sksl/ast/SkSLASTType.h index 9cbded1043..b95c3d7a0b 100644 --- a/src/sksl/ast/SkSLASTType.h +++ b/src/sksl/ast/SkSLASTType.h @@ -21,10 +21,11 @@ struct ASTType : public ASTPositionNode { kStruct_Kind }; - ASTType(Position position, SkString name, Kind kind) + ASTType(Position position, SkString name, Kind kind, std::vector<int> sizes) : INHERITED(position) , fName(std::move(name)) - , fKind(kind) {} + , fKind(kind) + , fSizes(std::move(sizes)) {} SkString description() const override { return fName; @@ -34,6 +35,9 @@ struct ASTType : public ASTPositionNode { const Kind fKind; + // array sizes, -1 meaning unspecified + const std::vector<int> fSizes; + typedef ASTPositionNode INHERITED; }; |