82 for (
int row = 0; row <
height; ++row) {
84 for (
int col = 0; col <
width - 1; ++col) {
85 if (rowPtr[col] <= 127 && rowPtr[col + 1] >= 128) {
87 float interp = (127.5f - rowPtr[col]) / (rowPtr[col + 1] - rowPtr[col]);
88 float borderAlpha = (col +
interp) / 255.f;
92 float t = borderAlpha*(borderAlpha*(4.0f*borderAlpha - 6.0f) + 5.0f) / 3.0f;
95 const float kDistanceFieldAAFactor = 0.65f;
96 float d = 2.0f*kDistanceFieldAAFactor*t - kDistanceFieldAAFactor;
static size_t GetGammaLUTSize(SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma, int *width, int *height)
static bool GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma, uint8_t *data)
static const DistanceFieldAdjustTable * Get()
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
AutoTArray< uint8_t > data((int) size)