change tooBitForLCD to compare against linear size of the text, not the area
BUG=skia: R=bungeman@google.com, alokp@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/200643003 git-svn-id: http://skia.googlecode.com/svn/trunk@13817 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
e01cdb3a20
commit
e78f7cfced
@ -1552,10 +1552,10 @@ static SkColor computeLuminanceColor(const SkPaint& paint) {
|
||||
#endif
|
||||
|
||||
static bool tooBigForLCD(const SkScalerContext::Rec& rec) {
|
||||
SkScalar area = SkScalarMul(rec.fPost2x2[0][0], rec.fPost2x2[1][1]) -
|
||||
SkScalarMul(rec.fPost2x2[1][0], rec.fPost2x2[0][1]);
|
||||
SkScalar size = SkScalarMul(area, rec.fTextSize);
|
||||
return SkScalarAbs(size) > SkIntToScalar(SK_MAX_SIZE_FOR_LCDTEXT);
|
||||
SkScalar area = rec.fPost2x2[0][0] * rec.fPost2x2[1][1] -
|
||||
rec.fPost2x2[1][0] * rec.fPost2x2[0][1];
|
||||
SkScalar size = SkScalarSqrt(SkScalarAbs(area)) * rec.fTextSize;
|
||||
return size > SkIntToScalar(SK_MAX_SIZE_FOR_LCDTEXT);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user