Remove SK_SUPPORT_LEGACY_GRADIENT_COLOR_CONVERSION

The original change didn't produce any diffs, so this flag is not
useful.

TBR=

Change-Id: Ic4c8d6dcd7d03ace8624345fd624bc5840b99d27
Reviewed-on: https://skia-review.googlesource.com/67724
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2017-11-03 16:57:54 -04:00 committed by Skia Commit-Bot
parent 74d24c65d1
commit a90904942c

View File

@ -508,14 +508,10 @@ SkColor4f SkGradientShaderBase::getXformedColor(size_t i, SkColorSpace* dstCS) c
}
// Legacy/srgb color.
#ifdef SK_SUPPORT_LEGACY_GRADIENT_COLOR_CONVERSION
return SkColor4f_from_SkColor(this->getLegacyColor(i), nullptr);
#else
// We quantize upfront to ensure stable SkColor round-trips.
auto rgb255 = sk_linear_to_srgb(Sk4f::Load(fOrigColors4f[i].vec()));
auto rgb = SkNx_cast<float>(rgb255) * (1/255.0f);
return { rgb[0], rgb[1], rgb[2], fOrigColors4f[i].fA };
#endif
}
SK_DECLARE_STATIC_MUTEX(gGradientCacheMutex);