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

Unified Diff: src/core/Sk4px.h

Issue 1132853005: Sk4px: SrcATop, DstATop, Xor, Multiply (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: multiply too 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 | « no previous file | src/core/SkXfermode.cpp » ('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 af078ca92b3151b6f7578d20161d5b7cd7d5dc0b..5537b90230ebe774deca62ddf1a910ca14ae1585 100644
--- a/src/core/Sk4px.h
+++ b/src/core/Sk4px.h
@@ -14,21 +14,22 @@
// 1, 2 or 4 SkPMColors, generally vectorized.
class Sk4px : public Sk16b {
public:
- Sk4px(SkAlpha a) : INHERITED(a) {} // Duplicate 16x.
- Sk4px(SkPMColor); // Duplicate 4x.
+ Sk4px(SkAlpha a) : INHERITED(a) {} // Duplicate 16x: a -> aaaa aaaa aaaa aaaa
+ Sk4px(SkPMColor); // Duplicate 4x: argb -> argb argb argb argb
Sk4px(const Sk16b& v) : INHERITED(v) {}
- // ARGB argb XYZW xyzw -> AAAA aaaa XXXX xxxx
- Sk4px alphas() const;
+ Sk4px alphas() const; // ARGB argb XYZW xyzw -> AAAA aaaa XXXX xxxx
+
+ Sk4px inv() const { return Sk16b(255) - *this; }
// When loading or storing fewer than 4 SkPMColors, we use the low lanes.
- static Sk4px Load4(const SkPMColor[4]);
- static Sk4px Load2(const SkPMColor[2]);
- static Sk4px Load1(const SkPMColor[1]);
+ static Sk4px Load4(const SkPMColor[4]); // PMColor[4] -> ARGB argb XYZW xyzw
+ static Sk4px Load2(const SkPMColor[2]); // PMColor[2] -> ARGB argb ???? ????
+ static Sk4px Load1(const SkPMColor[1]); // PMColor[1] -> ARGB ???? ???? ????
// Ditto for Alphas... Load2Alphas fills the low two lanes of Sk4px.
static Sk4px Load4Alphas(const SkAlpha[4]); // AaXx -> AAAA aaaa XXXX xxxx
- static Sk4px Load2Alphas(const SkAlpha[2]); // Aa -> AAAA aaaa 0000 0000
+ static Sk4px Load2Alphas(const SkAlpha[2]); // Aa -> AAAA aaaa ???? ????
void store4(SkPMColor[4]) const;
void store2(SkPMColor[2]) const;
« no previous file with comments | « no previous file | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698