diff options
author | msarett <msarett@google.com> | 2016-07-13 13:18:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-13 13:18:40 -0700 |
commit | e92badc3ffce83668f76fcfa33a49784346cab1e (patch) | |
tree | 5c05deb93ca06313ad1916ecaa5f1fe1ebd0ca59 /src/sksl/ir/SkSLVarDeclaration.h | |
parent | 16ef465ea92291b860ee5ea8f3d51d5d3f4f1059 (diff) |
Revert of SkSL performance improvements (patchset #6 id:140001 of https://codereview.chromium.org/2131223002/ )
Reason for revert:
Valgrind bot failures
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/1224/steps/test_skia%20on%20Ubuntu/logs/stdio
Original issue's description:
> SkSL performance improvements (plus a couple of minor warning fixes)
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131223002
>
> Committed: https://skia.googlesource.com/skia/+/9fd67a1f53809f5eff1210dd107241b450c48acc
TBR=benjaminwagner@google.com,egdaniel@google.com,ethannicholas@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2143323003
Diffstat (limited to 'src/sksl/ir/SkSLVarDeclaration.h')
-rw-r--r-- | src/sksl/ir/SkSLVarDeclaration.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sksl/ir/SkSLVarDeclaration.h b/src/sksl/ir/SkSLVarDeclaration.h index b234231b86..400f430e4c 100644 --- a/src/sksl/ir/SkSLVarDeclaration.h +++ b/src/sksl/ir/SkSLVarDeclaration.h @@ -20,7 +20,7 @@ namespace SkSL { * names ['x', 'y', 'z'], sizes of [[], [], [4, 2]], and values of [null, 1, null]. */ struct VarDeclaration : public ProgramElement { - VarDeclaration(Position position, std::vector<const Variable*> vars, + VarDeclaration(Position position, std::vector<std::shared_ptr<Variable>> vars, std::vector<std::vector<std::unique_ptr<Expression>>> sizes, std::vector<std::unique_ptr<Expression>> values) : INHERITED(position, kVar_Kind) @@ -30,9 +30,9 @@ struct VarDeclaration : public ProgramElement { std::string description() const override { std::string result = fVars[0]->fModifiers.description(); - const Type* baseType = &fVars[0]->fType; + std::shared_ptr<Type> baseType = fVars[0]->fType; while (baseType->kind() == Type::kArray_Kind) { - baseType = &baseType->componentType(); + baseType = baseType->componentType(); } result += baseType->description(); std::string separator = " "; @@ -55,7 +55,7 @@ struct VarDeclaration : public ProgramElement { return result; } - const std::vector<const Variable*> fVars; + const std::vector<std::shared_ptr<Variable>> fVars; const std::vector<std::vector<std::unique_ptr<Expression>>> fSizes; const std::vector<std::unique_ptr<Expression>> fValues; |