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

Unified Diff: src/opts/SkColorCubeFilter_opts.h

Issue 1295873004: SkColorCubeFilter: require alpha == 0xFF. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: just perf Created 5 years, 4 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
Index: src/opts/SkColorCubeFilter_opts.h
diff --git a/src/opts/SkColorCubeFilter_opts.h b/src/opts/SkColorCubeFilter_opts.h
index 92c75664d29d97716a91a15d0f2f8fa3a7271b9e..a61f66d17418d94406fcf02918f0422477b2a040 100644
--- a/src/opts/SkColorCubeFilter_opts.h
+++ b/src/opts/SkColorCubeFilter_opts.h
@@ -61,10 +61,10 @@ void color_cube_filter_span(const SkPMColor src[],
const SkColor lutColor10 = colorCube[ix + i10];
const SkColor lutColor11 = colorCube[ix + i11];
- Sk4f sum = SkPMFloat::FromBGRx(lutColor00) * g0b0;
- sum = sum + SkPMFloat::FromBGRx(lutColor01) * g0b1;
- sum = sum + SkPMFloat::FromBGRx(lutColor10) * g1b0;
- sum = sum + SkPMFloat::FromBGRx(lutColor11) * g1b1;
+ Sk4f sum = SkPMFloat::FromOpaqueColor(lutColor00) * g0b0;
+ sum = sum + SkPMFloat::FromOpaqueColor(lutColor01) * g0b1;
+ sum = sum + SkPMFloat::FromOpaqueColor(lutColor10) * g1b0;
+ sum = sum + SkPMFloat::FromOpaqueColor(lutColor11) * g1b1;
color = color + sum * Sk4f((float)colorToFactors[x][r]);
}

Powered by Google App Engine
This is Rietveld 408576698