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

Unified Diff: src/core/Sk4px.h

Issue 1230663005: 3-15% speedup to HardLight / Overlay xfermodes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add a test that widenLo() | widenHi() == widenLoHi() Created 5 years, 5 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/Sk4pxXfermode.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 e046e265fee1fad30d141ba8e96cae61d0a5f0f0..e1d4dc1244b0804b4146d491415d7a7d43e5ff92 100644
--- a/src/core/Sk4px.h
+++ b/src/core/Sk4px.h
@@ -70,6 +70,7 @@ public:
Wide operator >> (int bits) const { return INHERITED::operator>>(bits); }
Wide operator << (int bits) const { return INHERITED::operator<<(bits); }
static Wide Min(const Wide& a, const Wide& b) { return INHERITED::Min(a,b); }
+ Wide thenElse(const Wide& t, const Wide& e) const { return INHERITED::thenElse(t,e); }
private:
typedef Sk16h INHERITED;
@@ -77,6 +78,7 @@ public:
Wide widenLo() const; // ARGB -> 0A 0R 0G 0B
Wide widenHi() const; // ARGB -> A0 R0 G0 B0
+ Wide widenLoHi() const; // ARGB -> AA RR GG BB
Wide mulWiden(const Sk16b&) const; // 8-bit x 8-bit -> 16-bit components.
// The only 8-bit multiply we use is 8-bit x 8-bit -> 16-bit. Might as well make it pithy.
« no previous file with comments | « no previous file | src/core/Sk4pxXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698