aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ast/SkSLASTLayout.h
diff options
context:
space:
mode:
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;