aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-08-31 09:22:38 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-31 09:22:38 -0700
commit5ef194c31ae498166bd9c468993514c5267ea077 (patch)
treec04f78d03a4a32ae36b5b45960e6a09ae57a7503 /gyp
parent89971d4537f3b8bca3d310f9a44ab595c6c50ddc (diff)
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 Review URL: https://codereview.chromium.org/1317913005
Diffstat (limited to 'gyp')
-rw-r--r--gyp/tools.gyp11
-rw-r--r--gyp/utils.gypi1
2 files changed, 12 insertions, 0 deletions
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index d7b2e131e7..463fa732a7 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -37,6 +37,7 @@
'skpmaker',
'test_image_decoder',
'test_public_includes',
+ 'whitelist_typefaces',
],
'conditions': [
['skia_shared_lib',
@@ -651,6 +652,16 @@
},
},
{
+ 'target_name': 'whitelist_typefaces',
+ 'type': 'executable',
+ 'sources': [
+ '../tools/whitelist_typefaces.cpp',
+ ],
+ 'dependencies': [
+ 'skia_lib.gyp:skia_lib',
+ ],
+ },
+ {
'target_name': 'test_public_includes',
'type': 'static_library',
# Ensure that our public headers don't have unused params so that clients
diff --git a/gyp/utils.gypi b/gyp/utils.gypi
index 53ea7f0dfc..e2abc03d5a 100644
--- a/gyp/utils.gypi
+++ b/gyp/utils.gypi
@@ -100,6 +100,7 @@
'<(skia_src_path)/utils/SkThreadUtils_win.cpp',
'<(skia_src_path)/utils/SkThreadUtils_win.h',
'<(skia_src_path)/utils/SkTFitsIn.h',
+ '<(skia_src_path)/utils/SkWhitelistTypefaces.cpp',
#mac
'<(skia_include_path)/utils/mac/SkCGUtils.h',