diff options
author | Ruiqi Mao <ruiqimao@google.com> | 2018-07-17 10:19:38 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-17 15:08:40 +0000 |
commit | b609e6dc6a02336aed04caaddcdd5ccfbe7ba9ec (patch) | |
tree | 052d6e5c5c7835481f5a0e0bead6ec575679b76f /src/sksl/ir/SkSLSwizzle.h | |
parent | 6dd4b209091b876832218e8adf1909669960bf98 (diff) |
added byte and ubyte types to SKSL
created new GMs for skinning
Bug: skia:
Change-Id: I15fb2bd02fba8beb6dd2dd3f3716da016ea92192
Reviewed-on: https://skia-review.googlesource.com/140241
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/ir/SkSLSwizzle.h')
-rw-r--r-- | src/sksl/ir/SkSLSwizzle.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLSwizzle.h b/src/sksl/ir/SkSLSwizzle.h index b90b78d916..e713a323b3 100644 --- a/src/sksl/ir/SkSLSwizzle.h +++ b/src/sksl/ir/SkSLSwizzle.h @@ -56,6 +56,12 @@ static const Type& get_type(const Context& context, Expression& value, size_t co case 3: return *context.fShort3_Type; case 4: return *context.fShort4_Type; } + } else if (base == *context.fByte_Type) { + switch (count) { + case 2: return *context.fByte2_Type; + case 3: return *context.fByte3_Type; + case 4: return *context.fByte4_Type; + } } else if (base == *context.fUInt_Type) { switch (count) { case 2: return *context.fUInt2_Type; @@ -68,6 +74,12 @@ static const Type& get_type(const Context& context, Expression& value, size_t co case 3: return *context.fUShort3_Type; case 4: return *context.fUShort4_Type; } + } else if (base == *context.fUByte_Type) { + switch (count) { + case 2: return *context.fUByte2_Type; + case 3: return *context.fUByte3_Type; + case 4: return *context.fUByte4_Type; + } } else if (base == *context.fBool_Type) { switch (count) { case 2: return *context.fBool2_Type; |