Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: src/core/SkPaint.cpp

Issue 1924033002: skip unneeded header from writeFlattenable when building font-cache-key. Saves ~30% in size (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 123f20365e6ef2cf96a905e46681be48f684655d..d28168a58e9ea3c8fdbc248eeaa350e875031355 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698