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

Unified Diff: src/opts/Sk4px_none.h

Issue 1141213002: Sk4px: Difference and Exclusion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: back to 8-bit Created 5 years, 7 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/Sk4px_SSE2.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/Sk4px_none.h
diff --git a/src/opts/Sk4px_none.h b/src/opts/Sk4px_none.h
index 340a36fd1478014141032faa24921dc82824aafe..541443d772a4b84e4626da457f472fca4097daa5 100644
--- a/src/opts/Sk4px_none.h
+++ b/src/opts/Sk4px_none.h
@@ -77,3 +77,20 @@ inline Sk4px Sk4px::Load2Alphas(const SkAlpha a[2]) {
0,0,0,0,
0,0,0,0);
}
+
+inline Sk4px Sk4px::zeroAlphas() const {
+ static_assert(SK_A32_SHIFT == 24, "This method assumes little-endian.");
+ return Sk16b(this->kth< 0>(), this->kth< 1>(), this->kth< 2>(), 0,
+ this->kth< 4>(), this->kth< 5>(), this->kth< 6>(), 0,
+ this->kth< 8>(), this->kth< 9>(), this->kth<10>(), 0,
+ this->kth<12>(), this->kth<13>(), this->kth<14>(), 0);
+}
+
+inline Sk4px Sk4px::zeroColors() const {
+ static_assert(SK_A32_SHIFT == 24, "This method assumes little-endian.");
+ return Sk16b(0,0,0, this->kth< 3>(),
+ 0,0,0, this->kth< 7>(),
+ 0,0,0, this->kth<11>(),
+ 0,0,0, this->kth<15>());
+}
+
« no previous file with comments | « src/opts/Sk4px_SSE2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698