aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ast/SkSLASTLayout.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2016-11-21 10:39:35 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-21 17:14:43 +0000
commit9e1138d56665d13641f8805cd72ae81adc255f79 (patch)
tree1c94ded7cff10f5f62233d1de83c3d30ad0a2893 /src/sksl/ast/SkSLASTLayout.h
parente54d4cefb7864a575c01894b2e5e0df16978c6e6 (diff)
re-land of switched skslc from std::string to SkString
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5084 Change-Id: Ib21c30afc0d8483392b417e660b7fecfcc30e617 Reviewed-on: https://skia-review.googlesource.com/5084 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/ast/SkSLASTLayout.h')
-rw-r--r--src/sksl/ast/SkSLASTLayout.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h
index ae3c3b6168..cb7f3c175c 100644
--- a/src/sksl/ast/SkSLASTLayout.h
+++ b/src/sksl/ast/SkSLASTLayout.h
@@ -48,7 +48,7 @@ struct ASTLayout : public ASTNode {
return "";
}
- static bool ReadFormat(std::string str, Format* format) {
+ static bool ReadFormat(SkString str, Format* format) {
if (str == "rgba32f") {
*format = Format::kRGBA32F;
return true;
@@ -90,9 +90,9 @@ struct ASTLayout : public ASTNode {
, fBlendSupportAllEquations(blendSupportAllEquations)
, fFormat(format) {}
- std::string description() const {
- std::string result;
- std::string separator;
+ SkString description() const {
+ SkString result;
+ SkString separator;
if (fLocation >= 0) {
result += separator + "location = " + to_string(fLocation);
separator = ", ";
@@ -129,7 +129,7 @@ struct ASTLayout : public ASTNode {
result += separator + FormatToStr(fFormat);
separator = ", ";
}
- if (result.length() > 0) {
+ if (result.size() > 0) {
result = "layout (" + result + ")";
}
return result;