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

Unified Diff: src/core/Sk4px.h

Issue 1452903004: div255(x) as ((x+128)*257)>>16 with SSE (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: notes Created 5 years, 1 month 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/opts/Sk4px_NEON.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/Sk4px.h
diff --git a/src/core/Sk4px.h b/src/core/Sk4px.h
index a7f5c9f4c6fcc11e6962ef3121e8a9ed79db3d3c..3755488a4a21274fd44f8ee3d89a6a92db581791 100644
--- a/src/core/Sk4px.h
+++ b/src/core/Sk4px.h
@@ -66,11 +66,7 @@ public:
Sk4px addNarrowHi(const Sk16h&) const;
// Rounds, i.e. (x+127) / 255.
- Sk4px div255() const {
- // Calculated as ((x+128) + ((x+128)>>8)) >> 8.
- auto v = *this + Sk16h(128);
- return v.addNarrowHi(v >> 8);
- }
+ Sk4px div255() const;
// These just keep the types as Wide so the user doesn't have to keep casting.
Wide operator * (const Wide& o) const { return INHERITED::operator*(o); }
« no previous file with comments | « no previous file | src/opts/Sk4px_NEON.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698