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/SkSpanProcs.cpp

Issue 2163683002: Correct sRGB <-> linear everywhere. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: back to brute 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 | « src/core/SkPM4fPriv.h ('k') | src/core/SkXfermode4f.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpanProcs.cpp
diff --git a/src/core/SkSpanProcs.cpp b/src/core/SkSpanProcs.cpp
index 87dcbc0ee74d8aa6d975df82632f0cff6a6a816e..b2e9914a1784352a0b8825a79b9d5c4567d28201 100644
--- a/src/core/SkSpanProcs.cpp
+++ b/src/core/SkSpanProcs.cpp
@@ -22,7 +22,7 @@ static void load_l32(const SkPixmap& src, int x, int y, SkPM4f span[], int count
SkASSERT(src.addr32(x + count - 1, y));
for (int i = 0; i < count; ++i) {
- (to_4f_rgba(addr[i]) * Sk4f(1.0f/255)).store(span[i].fVec);
+ swizzle_rb_if_bgra(Sk4f_fromL32(addr[i])).store(span[i].fVec);
}
}
@@ -32,7 +32,7 @@ static void load_s32(const SkPixmap& src, int x, int y, SkPM4f span[], int count
SkASSERT(src.addr32(x + count - 1, y));
for (int i = 0; i < count; ++i) {
- srgb_to_linear(to_4f_rgba(addr[i]) * Sk4f(1.0f/255)).store(span[i].fVec);
+ swizzle_rb_if_bgra(Sk4f_fromS32(addr[i])).store(span[i].fVec);
}
}
« no previous file with comments | « src/core/SkPM4fPriv.h ('k') | src/core/SkXfermode4f.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698