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

Issue 1317913005: whitelist fallback typefaces (Closed)

Created:
5 years, 3 months ago by caryclark
Modified:
5 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Suppress embedding fonts when the skp's fonts match the OS fonts. The million SKPs generated require >5T of storage. A good deal of that are copies of system fonts. Chrome built with #DEFINE SK_WHITELIST_SERIALIZED_TYPEFACES will omit the font data if the font matches a precomputed checksum. The captured SKP prepends sk_ to the names of fonts that have their data omitted. The SKP consumer can either add renamed fonts from the recording machine, or add gDeserializeTypefaceDelegate = WhitelistDeserializeTypeface; which strips the sk_ prefix when deserializing typefaces. whitelist_typefaces --check Computes the checksums of fallback fonts and returns 0 if the checksums match the checked-in file SkWhitelistChecksum.cpp. whitelist_typefaces --generate Writes an updated version of SkWhitelistChecksum.cpp. (Added Mike since this modifies a public header) R=bungeman@google.com,rmistry@google.com,reed@google.com Committed: https://skia.googlesource.com/skia/+/5ef194c31ae498166bd9c468993514c5267ea077

Patch Set 1 #

Patch Set 2 : fix compiler bugs #

Total comments: 2

Patch Set 3 : add string test #

Patch Set 4 : fix unsigned mismatch #

Total comments: 1

Patch Set 5 : remove string change #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -21 lines) Patch
M gyp/tools.gyp View 1 2 chunks +11 lines, -0 lines 0 comments Download
M gyp/utils.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkTypeface.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/core/SkPictureData.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M src/core/SkTypeface.cpp View 3 chunks +15 lines, -12 lines 0 comments Download
A src/utils/SkWhitelistChecksums.cpp View 1 chunk +50 lines, -0 lines 0 comments Download
A src/utils/SkWhitelistTypefaces.cpp View 1 2 3 4 1 chunk +335 lines, -0 lines 3 comments Download
M tests/PictureTest.cpp View 1 chunk +13 lines, -0 lines 0 comments Download
A tools/whitelist_typefaces.cpp View 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (17 generated)
_cary
5 years, 3 months ago (2015-08-28 20:20:31 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/1
5 years, 3 months ago (2015-08-28 20:20:34 UTC) #3
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 3 months ago (2015-08-28 20:20:35 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/3012)
5 years, 3 months ago (2015-08-28 20:23:15 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/20001
5 years, 3 months ago (2015-08-28 20:26:45 UTC) #8
bungeman-skia
https://codereview.chromium.org/1317913005/diff/20001/src/core/SkString.cpp File src/core/SkString.cpp (right): https://codereview.chromium.org/1317913005/diff/20001/src/core/SkString.cpp#newcode380 src/core/SkString.cpp:380: SkString tmp(text ? text : this->c_str(), len); What is ...
5 years, 3 months ago (2015-08-28 21:09:57 UTC) #9
commit-bot: I haz the power
Dry run: No LGTM from a valid reviewer yet. Please ask for an LGTM from ...
5 years, 3 months ago (2015-08-29 02:20:00 UTC) #11
reed1
lgtm https://codereview.chromium.org/1317913005/diff/20001/src/core/SkString.cpp File src/core/SkString.cpp (right): https://codereview.chromium.org/1317913005/diff/20001/src/core/SkString.cpp#newcode380 src/core/SkString.cpp:380: SkString tmp(text ? text : this->c_str(), len); On ...
5 years, 3 months ago (2015-08-31 12:20:25 UTC) #14
caryclark
On 2015/08/31 12:20:25, reed1 wrote: > lgtm > > https://codereview.chromium.org/1317913005/diff/20001/src/core/SkString.cpp > File src/core/SkString.cpp (right): > ...
5 years, 3 months ago (2015-08-31 13:11:08 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/40001
5 years, 3 months ago (2015-08-31 13:11:23 UTC) #18
commit-bot: I haz the power
All required reviewers (with asterisk prefixes) have not yet approved this CL. No LGTM from ...
5 years, 3 months ago (2015-08-31 13:11:25 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/40001
5 years, 3 months ago (2015-08-31 13:15:22 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/3021)
5 years, 3 months ago (2015-08-31 13:18:13 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/60001
5 years, 3 months ago (2015-08-31 13:24:02 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-31 13:29:04 UTC) #28
bungeman-skia
https://codereview.chromium.org/1317913005/diff/60001/src/core/SkString.cpp File src/core/SkString.cpp (right): https://codereview.chromium.org/1317913005/diff/60001/src/core/SkString.cpp#newcode380 src/core/SkString.cpp:380: SkString tmp(text ? text : this->c_str(), len); Hmmm... I ...
5 years, 3 months ago (2015-08-31 15:09:08 UTC) #29
bungeman-skia
lgtm Cleanup comments can be addressed later. https://codereview.chromium.org/1317913005/diff/80001/src/utils/SkWhitelistTypefaces.cpp File src/utils/SkWhitelistTypefaces.cpp (right): https://codereview.chromium.org/1317913005/diff/80001/src/utils/SkWhitelistTypefaces.cpp#newcode37 src/utils/SkWhitelistTypefaces.cpp:37: struct NameTable ...
5 years, 3 months ago (2015-08-31 15:59:32 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/80001
5 years, 3 months ago (2015-08-31 16:12:36 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-31 16:17:47 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317913005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317913005/80001
5 years, 3 months ago (2015-08-31 16:22:04 UTC) #37
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://skia.googlesource.com/skia/+/5ef194c31ae498166bd9c468993514c5267ea077
5 years, 3 months ago (2015-08-31 16:22:41 UTC) #38
caryclark
5 years, 3 months ago (2015-09-01 12:17:37 UTC) #39
Message was sent while issue was closed.
https://codereview.chromium.org/1317913005/diff/80001/src/utils/SkWhitelistTy...
File src/utils/SkWhitelistTypefaces.cpp (right):

https://codereview.chromium.org/1317913005/diff/80001/src/utils/SkWhitelistTy...
src/utils/SkWhitelistTypefaces.cpp:91: int stringLen = name_table(nameTable, 1,
&stringLoc);
I'll switch over to LocalizedStrings_NameTable in a separate CL.

Powered by Google App Engine
This is Rietveld 408576698