mixed text blobs really draws LCD
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1261483002
This commit is contained in:
parent
d18b861061
commit
20dac88565
@ -69,6 +69,7 @@ protected:
|
||||
// LCD
|
||||
paint.setTextSize(32);
|
||||
text = "LCD!!!!!";
|
||||
paint.setAntiAlias(true);
|
||||
paint.setSubpixelText(true);
|
||||
paint.setLCDRenderText(true);
|
||||
paint.measureText(text, strlen(text), &bounds);
|
||||
@ -78,6 +79,7 @@ protected:
|
||||
|
||||
// color emoji
|
||||
if (fEmojiTypeface) {
|
||||
paint.setAntiAlias(false);
|
||||
paint.setSubpixelText(false);
|
||||
paint.setLCDRenderText(false);
|
||||
paint.setTypeface(fEmojiTypeface);
|
||||
|
@ -1243,7 +1243,7 @@ static void add_flattenable(SkDescriptor* desc, uint32_t tag,
|
||||
buffer->writeToMemory(desc->addEntry(tag, buffer->bytesWritten(), NULL));
|
||||
}
|
||||
|
||||
static SkMask::Format computeMaskFormat(const SkPaint& paint) {
|
||||
static SkMask::Format compute_mask_format(const SkPaint& paint) {
|
||||
uint32_t flags = paint.getFlags();
|
||||
|
||||
// Antialiasing being disabled trumps all other settings.
|
||||
@ -1405,7 +1405,7 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
|
||||
rec->fStrokeJoin = 0;
|
||||
}
|
||||
|
||||
rec->fMaskFormat = SkToU8(computeMaskFormat(paint));
|
||||
rec->fMaskFormat = SkToU8(compute_mask_format(paint));
|
||||
|
||||
if (SkMask::kLCD16_Format == rec->fMaskFormat) {
|
||||
if (too_big_for_lcd(*rec, checkPost2x2)) {
|
||||
|
Loading…
Reference in New Issue
Block a user