Bug fix: we're using SkPMFloat methods on SkColor.

Annoyingly our test bot that forces SkPMFloat_none is a Linux bot using
BGRA SkPMColors, so we'd never notice the bug there.

BUG=skia:

Review URL: https://codereview.chromium.org/1296383006
This commit is contained in:
mtklein 2015-08-19 17:06:36 -07:00 committed by Commit bot
parent 3a30cc1cbb
commit 3679c1bbe7

View File

@ -37,9 +37,9 @@ inline Sk4f SkPMFloat::alphas() const {
inline SkPMFloat SkPMFloat::FromBGRx(SkColor c) {
float inv255 = 1.0f / 255;
SkPMFloat pmf = SkPMFloat::FromARGB(1.0f,
SkGetPackedR32(c) * inv255,
SkGetPackedG32(c) * inv255,
SkGetPackedB32(c) * inv255);
SkColorGetR(c) * inv255,
SkColorGetG(c) * inv255,
SkColorGetB(c) * inv255);
SkASSERT(pmf.isValid());
return pmf;
}