diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-05-19 14:03:45 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-19 18:50:32 +0000 |
commit | 985febffa2c099bf3b9d50806c7e282247fece32 (patch) | |
tree | 2727187f4fc3b697f4fd13d6e176f5ca76ddbf58 | |
parent | 1558123254dc0e2b4f29f786e42cf504891d4866 (diff) |
minor skslc bugfixes
This fixes the attributes on sk_VertexID, and a backwards test on
SkSL::String::startsWith and ::endsWith.
Change-Id: Icfddfc8ca95454d8646a1771761685c2525b296e
Reviewed-on: https://skia-review.googlesource.com/17398
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
-rw-r--r-- | src/sksl/SkSLString.cpp | 4 | ||||
-rw-r--r-- | src/sksl/sksl_vert.include | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/sksl/SkSLString.cpp b/src/sksl/SkSLString.cpp index 8e531ae0fb..9b2c1780f8 100644 --- a/src/sksl/SkSLString.cpp +++ b/src/sksl/SkSLString.cpp @@ -53,7 +53,7 @@ void String::vappendf(const char* fmt, va_list args) { bool String::startsWith(const char* s) const { - return strncmp(c_str(), s, strlen(s)); + return !strncmp(c_str(), s, strlen(s)); } bool String::endsWith(const char* s) const { @@ -61,7 +61,7 @@ bool String::endsWith(const char* s) const { if (size() < len) { return false; } - return strncmp(c_str() + size() - len, s, len); + return !strncmp(c_str() + size() - len, s, len); } String String::operator+(const char* s) const { diff --git a/src/sksl/sksl_vert.include b/src/sksl/sksl_vert.include index e7e9d59ea8..2c38a8b346 100644 --- a/src/sksl/sksl_vert.include +++ b/src/sksl/sksl_vert.include @@ -8,7 +8,7 @@ out sk_PerVertex { layout(builtin=3) float sk_ClipDistance[1]; }; -layout(builtin=5) int sk_VertexID; +layout(builtin=5) in int sk_VertexID; ) |