Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4221)

Unified Diff: bench/GeometryBench.cpp

Issue 1001833006: remove slower scalar code in favor of vectors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkGeometry.h » ('j') | src/core/SkGeometry.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GeometryBench.cpp
diff --git a/bench/GeometryBench.cpp b/bench/GeometryBench.cpp
index 501c7b82629c39efbcb41f46597d7305e0f750fc..6cd9ca2377358a0ad4f14e512a5b2c3cb4f8269c 100644
--- a/bench/GeometryBench.cpp
+++ b/bench/GeometryBench.cpp
@@ -212,9 +212,9 @@ DEF_BENCH( return new EvalQuadTangentAt1; )
////////
-class ChopQuadAt0 : public QuadBenchBase {
+class ChopQuadAt : public QuadBenchBase {
public:
- ChopQuadAt0() : QuadBenchBase("chopquadat0") {}
+ ChopQuadAt() : QuadBenchBase("chopquadat") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint dst[5];
@@ -226,27 +226,11 @@ protected:
}
}
};
-DEF_BENCH( return new ChopQuadAt0; )
+DEF_BENCH( return new ChopQuadAt; )
-class ChopQuadAt1 : public QuadBenchBase {
+class ChopCubicAt : public QuadBenchBase {
public:
- ChopQuadAt1() : QuadBenchBase("chopquadat1") {}
-protected:
- void onDraw(const int loops, SkCanvas* canvas) override {
- SkPoint dst[5];
- for (int outer = 0; outer < loops; ++outer) {
- SkChopQuadAt2(fPts, dst, 0.5f);
- SkChopQuadAt2(fPts, dst, 0.5f);
- SkChopQuadAt2(fPts, dst, 0.5f);
- SkChopQuadAt2(fPts, dst, 0.5f);
- }
- }
-};
-DEF_BENCH( return new ChopQuadAt1; )
-
-class ChopCubicAt0 : public QuadBenchBase {
-public:
- ChopCubicAt0() : QuadBenchBase("chopcubicat0") {}
+ ChopCubicAt() : QuadBenchBase("chopcubicat0") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint dst[7];
@@ -258,21 +242,5 @@ protected:
}
}
};
-DEF_BENCH( return new ChopCubicAt0; )
-
-class ChopCubicAt1 : public QuadBenchBase {
-public:
- ChopCubicAt1() : QuadBenchBase("chopcubicat1") {}
-protected:
- void onDraw(const int loops, SkCanvas* canvas) override {
- SkPoint dst[7];
- for (int outer = 0; outer < loops; ++outer) {
- SkChopCubicAt2(fPts, dst, 0.5f);
- SkChopCubicAt2(fPts, dst, 0.5f);
- SkChopCubicAt2(fPts, dst, 0.5f);
- SkChopCubicAt2(fPts, dst, 0.5f);
- }
- }
-};
-DEF_BENCH( return new ChopCubicAt1; )
+DEF_BENCH( return new ChopCubicAt; )
« no previous file with comments | « no previous file | src/core/SkGeometry.h » ('j') | src/core/SkGeometry.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698