Index: src/core/SkXfermode4f.cpp |
diff --git a/src/core/SkXfermode4f.cpp b/src/core/SkXfermode4f.cpp |
index bf30e92ae7dda664b7a88f8aa3565f3c41bdae51..b7f291371b38176c75b0fe520e0cb11caafad7a3 100644 |
--- a/src/core/SkXfermode4f.cpp |
+++ b/src/core/SkXfermode4f.cpp |
@@ -427,7 +427,11 @@ SkXfermode::PM4fProcN SkXfermode::getPM4fProcN(uint32_t flags) const { |
#include "SkColorPriv.h" |
static Sk4f lcd16_to_unit_4f(uint16_t rgb) { |
+#ifdef SK_PMCOLOR_IS_RGBA |
Sk4i rgbi = Sk4i(SkGetPackedR16(rgb), SkGetPackedG16(rgb), SkGetPackedB16(rgb), 0); |
+#else |
+ Sk4i rgbi = Sk4i(SkGetPackedB16(rgb), SkGetPackedG16(rgb), SkGetPackedR16(rgb), 0); |
+#endif |
return SkNx_cast<float>(rgbi) * Sk4f(1.0f/31, 1.0f/63, 1.0f/31, 0); |
} |