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

Unified Diff: src/core/SkColorFilter.cpp

Issue 2091793003: Fix bug in filterSpan4f - read the source, rather than the dest (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 | no next file » | 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 9470766732146c81723c4bea7a0c3d76f29903fa..8a37e1b56c022533243d2bcae0c92697840b5bbd 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -37,19 +37,20 @@ sk_sp<GrFragmentProcessor> SkColorFilter::asFragmentProcessor(GrContext*) const
}
#endif
-void SkColorFilter::filterSpan4f(const SkPM4f[], int count, SkPM4f span[]) const {
+void SkColorFilter::filterSpan4f(const SkPM4f src[], int count, SkPM4f result[]) const {
const int N = 128;
SkPMColor tmp[N];
while (count > 0) {
int n = SkTMin(count, N);
for (int i = 0; i < n; ++i) {
- SkNx_cast<uint8_t>(Sk4f::Load(span[i].fVec) * Sk4f(255) + Sk4f(0.5f)).store(&tmp[i]);
+ SkNx_cast<uint8_t>(Sk4f::Load(src[i].fVec) * Sk4f(255) + Sk4f(0.5f)).store(&tmp[i]);
}
this->filterSpan(tmp, n, tmp);
for (int i = 0; i < n; ++i) {
- span[i] = SkPM4f::FromPMColor(tmp[i]);
+ result[i] = SkPM4f::FromPMColor(tmp[i]);
}
- span += n;
+ src += n;
+ result += n;
count -= n;
}
}
« 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