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

Unified Diff: src/opts/Sk2x_none.h

Issue 1024993002: Sk2x::invert() and Sk2x::approxInvert() (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: invert() and approxInvert() 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 | « src/opts/Sk2x_neon.h ('k') | src/opts/Sk2x_sse.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/Sk2x_none.h
diff --git a/src/opts/Sk2x_none.h b/src/opts/Sk2x_none.h
index 65cc6703fbd88b942235d68f7c66f8ada2b16f43..2c68e736f48b59705c8b68aea98cdab42ccf2e3c 100644
--- a/src/opts/Sk2x_none.h
+++ b/src/opts/Sk2x_none.h
@@ -54,6 +54,9 @@ M(Sk2x<T>) Max(const Sk2x<T>& a, const Sk2x<T>& b) {
return Sk2x<T>(SkTMax(a.fVec[0], b.fVec[0]), SkTMax(a.fVec[1], b.fVec[1]));
}
+M(Sk2x<T>) invert() const { return Sk2x<T>((T)1.0 / fVec[0], (T)1.0 / fVec[1]); }
+M(Sk2x<T>) approxInvert() const { return this->invert(); }
+
#undef M
#define M template <> inline
« no previous file with comments | « src/opts/Sk2x_neon.h ('k') | src/opts/Sk2x_sse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698