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

Unified Diff: src/core/SkXfermode4f.cpp

Issue 2166533002: Fix color order on LCD text when using sRGB software backend. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: the other two Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode4f.cpp
diff --git a/src/core/SkXfermode4f.cpp b/src/core/SkXfermode4f.cpp
index 8671df7b2fcf102a43f2d6f16ac7006d89310d54..d861973dbfd88a866a5c9d1fc7bc94c3ecb3ba6c 100644
--- a/src/core/SkXfermode4f.cpp
+++ b/src/core/SkXfermode4f.cpp
@@ -441,7 +441,7 @@ static Sk4f lcd16_to_unit_4f(uint16_t rgb) {
template <DstType D>
void src_1_lcd(uint32_t dst[], const SkPM4f* src, int count, const uint16_t lcd[]) {
- const Sk4f s4 = Sk4f::Load(src->fVec);
+ const Sk4f s4 = src->to4f_pmorder();
if (D == kLinear_Dst) {
// operate in bias-255 space for src and dst
@@ -473,7 +473,7 @@ void src_n_lcd(uint32_t dst[], const SkPM4f src[], int count, const uint16_t lcd
if (0 == rgb) {
continue;
}
- Sk4f s4 = Sk4f::Load(src[i].fVec);
+ Sk4f s4 = src[i].to4f_pmorder();
Sk4f d4 = load_dst<D>(dst[i]);
dst[i] = store_dst<D>(lerp(s4, d4, lcd16_to_unit_4f(rgb))) | (SK_A32_MASK << SK_A32_SHIFT);
}
@@ -481,7 +481,7 @@ void src_n_lcd(uint32_t dst[], const SkPM4f src[], int count, const uint16_t lcd
template <DstType D>
void srcover_1_lcd(uint32_t dst[], const SkPM4f* src, int count, const uint16_t lcd[]) {
- const Sk4f s4 = Sk4f::Load(src->fVec);
+ const Sk4f s4 = src->to4f_pmorder();
Sk4f dst_scale = Sk4f(1 - get_alpha(s4));
for (int i = 0; i < count; ++i) {
@@ -503,7 +503,7 @@ void srcover_n_lcd(uint32_t dst[], const SkPM4f src[], int count, const uint16_t
if (0 == rgb) {
continue;
}
- Sk4f s4 = Sk4f::Load(src[i].fVec);
+ Sk4f s4 = src[i].to4f_pmorder();
Sk4f dst_scale = Sk4f(1 - get_alpha(s4));
Sk4f d4 = load_dst<D>(dst[i]);
Sk4f r4 = s4 + d4 * dst_scale;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698