skip unneeded header from writeFlattenable when building font-cache-key. Saves ~30% in size
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1924033002 TBR=mtklein Review-Url: https://codereview.chromium.org/1924033002
This commit is contained in:
parent
ef77ce9000
commit
80f5ea02cf
@ -1567,14 +1567,14 @@ static size_t fill_out_rec(const SkPaint& paint, SkScalerContext::Rec* rec,
|
||||
size_t descSize = sizeof(*rec);
|
||||
|
||||
if (pe) {
|
||||
peBuffer->writeFlattenable(pe);
|
||||
pe->flatten(*peBuffer);
|
||||
descSize += peBuffer->bytesWritten();
|
||||
entryCount += 1;
|
||||
rec->fMaskFormat = SkMask::kA8_Format; // force antialiasing when we do the scan conversion
|
||||
// seems like we could support kLCD as well at this point...
|
||||
}
|
||||
if (mf) {
|
||||
mfBuffer->writeFlattenable(mf);
|
||||
mf->flatten(*mfBuffer);
|
||||
descSize += mfBuffer->bytesWritten();
|
||||
entryCount += 1;
|
||||
rec->fMaskFormat = SkMask::kA8_Format; // force antialiasing with maskfilters
|
||||
@ -1585,7 +1585,7 @@ static size_t fill_out_rec(const SkPaint& paint, SkScalerContext::Rec* rec,
|
||||
rec->ignorePreBlend();
|
||||
}
|
||||
if (ra) {
|
||||
raBuffer->writeFlattenable(ra);
|
||||
ra->flatten(*raBuffer);
|
||||
descSize += raBuffer->bytesWritten();
|
||||
entryCount += 1;
|
||||
rec->fMaskFormat = SkMask::kA8_Format; // force antialiasing when we do the scan conversion
|
||||
|
Loading…
Reference in New Issue
Block a user