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

Unified Diff: src/core/SkPM4fPriv.h

Issue 1774523002: make pm4f be RGBA always, not pmcolor order (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update colormatrixfilter to know about RGBA Created 4 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
Index: src/core/SkPM4fPriv.h
diff --git a/src/core/SkPM4fPriv.h b/src/core/SkPM4fPriv.h
index b39891ea2082e929e74eb6322a398e9b89d70740..8f3096afc7580ebe0301d1d41e57484e90a093e7 100644
--- a/src/core/SkPM4fPriv.h
+++ b/src/core/SkPM4fPriv.h
@@ -5,9 +5,8 @@
* found in the LICENSE file.
*/
-#include "SkPM4f.h"
#include "SkColorPriv.h"
-#include "SkNx.h"
+#include "SkPM4f.h"
static inline float get_alpha(const Sk4f& f4) {
return f4[SkPM4f::A];
@@ -28,6 +27,10 @@ static inline Sk4f to_4f(uint32_t b4) {
return SkNx_cast<float>(Sk4b::Load((const uint8_t*)&b4));
}
+static inline Sk4f to_4f_rgba(uint32_t b4) {
+ return swizzle_pmorder_to_rgba(to_4f(b4));
+}
+
static inline Sk4f srgb_to_linear(const Sk4f& s4) {
return set_alpha(s4 * s4, get_alpha(s4));
}
« src/core/SkPM4f.h ('K') | « src/core/SkPM4f.h ('k') | src/core/SkSpanProcs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698