diff options
author | mtklein <mtklein@chromium.org> | 2016-02-22 16:56:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-22 16:56:00 -0800 |
commit | 888934723db64ebecb0d6e577ba7b70689d83dd2 (patch) | |
tree | f619bdf15b181c83750e410b9b9642686aa91d42 /src/core/SkLinearBitmapPipeline.cpp | |
parent | afe9facc9f7c70ed8a9097ed660bd0bdd31ed14b (diff) |
remove unnecessary copies
these used to matter with pass-by-ref
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1721153002
Review URL: https://codereview.chromium.org/1721153002
Diffstat (limited to 'src/core/SkLinearBitmapPipeline.cpp')
-rw-r--r-- | src/core/SkLinearBitmapPipeline.cpp | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp index f3b281aac7..02a4bd39f3 100644 --- a/src/core/SkLinearBitmapPipeline.cpp +++ b/src/core/SkLinearBitmapPipeline.cpp @@ -133,17 +133,13 @@ public: , fStrategy{std::forward<Args>(args)...}{ } void VECTORCALL pointListFew(int n, Sk4f xs, Sk4f ys) override { - Sk4f newXs = xs; - Sk4f newYs = ys; - fStrategy.processPoints(&newXs, &newYs); - fNext->pointListFew(n, newXs, newYs); + fStrategy.processPoints(&xs, &ys); + fNext->pointListFew(n, xs, ys); } void VECTORCALL pointList4(Sk4f xs, Sk4f ys) override { - Sk4f newXs = xs; - Sk4f newYs = ys; - fStrategy.processPoints(&newXs, &newYs); - fNext->pointList4(newXs, newYs); + fStrategy.processPoints(&xs, &ys); + fNext->pointList4(xs, ys); } void pointSpan(SkPoint start, SkScalar length, int count) override { @@ -167,24 +163,18 @@ public: , fStrategy{std::forward<Args>(args)...}{ } void VECTORCALL pointListFew(int n, Sk4f xs, Sk4f ys) override { - Sk4f newXs = xs; - Sk4f newYs = ys; - fStrategy.processPoints(&newXs, &newYs); - fNext->pointListFew(n, newXs, newYs); + fStrategy.processPoints(&xs, &ys); + fNext->pointListFew(n, xs, ys); } void VECTORCALL pointList4(Sk4f xs, Sk4f ys) override { - Sk4f newXs = xs; - Sk4f newYs = ys; - fStrategy.processPoints(&newXs, &newYs); - fNext->pointList4(newXs, newYs); + fStrategy.processPoints(&xs, &ys); + fNext->pointList4(xs, ys); } void VECTORCALL bilerpList(Sk4f xs, Sk4f ys) override { - Sk4f newXs = xs; - Sk4f newYs = ys; - fStrategy.processPoints(&newXs, &newYs); - fNext->bilerpList(newXs, newYs); + fStrategy.processPoints(&xs, &ys); + fNext->bilerpList(xs, ys); } void pointSpan(SkPoint start, SkScalar length, int count) override { @@ -202,7 +192,7 @@ class SkippedStage final : public SkLinearBitmapPipeline::BilerpProcessorInterfa void VECTORCALL pointListFew(int n, Sk4f xs, Sk4f ys) override { SkFAIL("Skipped stage."); } - void VECTORCALL pointList4(Sk4f Xs, Sk4f Ys) override { + void VECTORCALL pointList4(Sk4f xs, Sk4f ys) override { SkFAIL("Skipped stage."); } void VECTORCALL bilerpList(Sk4f xs, Sk4f ys) override { |