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

Unified Diff: src/core/SkColorFilter.cpp

Issue 2091923003: Fix incorrect swizzle on BGRA platforms in filterColor4f path (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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/SkPM4f.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorFilter.cpp
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp
index 8a37e1b56c022533243d2bcae0c92697840b5bbd..167a6683809732041e598f8e06cf14961a72cc9d 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -43,7 +43,7 @@ void SkColorFilter::filterSpan4f(const SkPM4f src[], int count, SkPM4f result[])
while (count > 0) {
int n = SkTMin(count, N);
for (int i = 0; i < n; ++i) {
- SkNx_cast<uint8_t>(Sk4f::Load(src[i].fVec) * Sk4f(255) + Sk4f(0.5f)).store(&tmp[i]);
+ tmp[i] = src[i].toPMColor();
}
this->filterSpan(tmp, n, tmp);
for (int i = 0; i < n; ++i) {
« no previous file with comments | « no previous file | src/core/SkPM4f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698