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

Unified Diff: bench/PMFloatBench.cpp

Issue 1048593002: Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T> (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: This is actually faster 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 | gyp/tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/PMFloatBench.cpp
diff --git a/bench/PMFloatBench.cpp b/bench/PMFloatBench.cpp
index 09819e9962f6b55edeb260d9007f0cde4810fe05..fd0d232d2a3003556f2916fe2e3ee0a9b6d51ffb 100644
--- a/bench/PMFloatBench.cpp
+++ b/bench/PMFloatBench.cpp
@@ -103,7 +103,7 @@ struct PMFloatGradientBench : public Benchmark {
SkPMColor fDevice[100];
void onDraw(const int loops, SkCanvas*) override {
- Sk4f c0 = SkPMFloat::FromARGB(255, 255, 0, 0),
+ Sk4s c0 = SkPMFloat::FromARGB(255, 255, 0, 0),
c1 = SkPMFloat::FromARGB(255, 0, 0, 255),
dc = c1 - c0,
fx(0.1f),
@@ -112,7 +112,7 @@ struct PMFloatGradientBench : public Benchmark {
dcdx4(dcdx+dcdx+dcdx+dcdx);
for (int n = 0; n < loops; n++) {
- Sk4f a = c0 + dc*fx + Sk4f(0.5f), // The +0.5f lets us call trunc() instead of get().
+ Sk4s a = c0 + dc*fx + Sk4s(0.5f), // The +0.5f lets us call trunc() instead of get().
b = a + dcdx,
c = b + dcdx,
d = c + dcdx;
« no previous file with comments | « no previous file | gyp/tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698