Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2025-06-17 09:32:50 +08:00
commit 6414271c91
47 changed files with 3341 additions and 1968 deletions

View file

@ -73,8 +73,11 @@ struct SkScalerContextRec {
return SkIntToScalar(fContrast) / ((1 << 8) - 1);
}
void setContrast(SkScalar c) {
SkASSERT(0 <= c && c <= SK_Scalar1);
fContrast = SkScalarRoundToInt(c * ((1 << 8) - 1));
if (0 <= c && c <= SK_Scalar1) {
fContrast = SkScalarRoundToInt(c * ((1 << 8) - 1));
} else {
fContrast = SkScalarRoundToInt(0.5f * ((1 << 8) - 1));
}
}
/**