Chromium Code Reviews| Index: src/sksl/ir/SkSLLayout.h |
| diff --git a/src/sksl/ir/SkSLLayout.h b/src/sksl/ir/SkSLLayout.h |
| index bab2f0e0dbd0457d16405572e5746045fd7ecdd3..2d27ed9e7dcafc6a2d506a712a2041112a074d67 100644 |
| --- a/src/sksl/ir/SkSLLayout.h |
| +++ b/src/sksl/ir/SkSLLayout.h |
| @@ -21,14 +21,16 @@ struct Layout { |
| , fBinding(layout.fBinding) |
| , fIndex(layout.fIndex) |
| , fSet(layout.fSet) |
| - , fBuiltin(layout.fBuiltin) {} |
| + , fBuiltin(layout.fBuiltin) |
| + , fOriginUpperLeft(layout.fOriginUpperLeft) {} |
| - Layout(int location, int binding, int index, int set, int builtin) |
| + Layout(int location, int binding, int index, int set, int builtin, bool originUpperLeft) |
| : fLocation(location) |
| , fBinding(binding) |
| , fIndex(index) |
| , fSet(set) |
| - , fBuiltin(builtin) {} |
| + , fBuiltin(builtin) |
| + , fOriginUpperLeft(originUpperLeft) {} |
| std::string description() const { |
| std::string result; |
| @@ -53,6 +55,10 @@ struct Layout { |
| result += separator + "builtin = " + to_string(fBuiltin); |
| separator = ", "; |
| } |
| + if (fOriginUpperLeft) { |
| + result += separator + "origin_upper_left"; |
| + separator = ", "; |
| + } |
| if (result.length() > 0) { |
| result = "layout (" + result + ")"; |
| } |
| @@ -71,11 +77,12 @@ struct Layout { |
| return !(*this == other); |
| } |
| - const int fLocation; |
|
dogben
2016/07/31 23:20:21
nit: Why remove const?
ethannicholas
2016/08/02 16:13:18
Because I added support for redeclaring a builtin
|
| - const int fBinding; |
| - const int fIndex; |
| - const int fSet; |
| - const int fBuiltin; |
| + int fLocation; |
| + int fBinding; |
| + int fIndex; |
| + int fSet; |
| + int fBuiltin; |
| + bool fOriginUpperLeft; |
| }; |
| } // namespace |