[skia] Avoid system fonts (#2030)

Avoid system fonts
This commit is contained in:
Kevin Lubick 2018-12-14 12:35:44 -05:00 committed by jonathanmetzman
parent 5d11173012
commit 0cc33f34a5
2 changed files with 60 additions and 18 deletions

View File

@ -28,12 +28,21 @@ test_app("region_deserialize") {
}
test_app("image_filter_deserialize") {
include_dirs = [
"tools",
"tools/fonts",
]
sources = [
"fuzz/Fuzz.cpp",
"fuzz/FuzzCommon.cpp",
"fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
"tools/Resources.cpp",
"tools/fonts/SkTestFontMgr.cpp",
"tools/fonts/SkTestSVGTypeface.cpp",
"tools/fonts/SkTestTypeface.cpp",
]
deps = [
":experimental_svg_model",
":flags",
":skia",
]
@ -52,12 +61,21 @@ test_app("region_set_path") {
}
test_app("textblob_deserialize") {
include_dirs = [
"tools",
"tools/fonts",
]
sources = [
"fuzz/Fuzz.cpp",
"fuzz/FuzzCommon.cpp",
"fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
"tools/Resources.cpp",
"tools/fonts/SkTestFontMgr.cpp",
"tools/fonts/SkTestSVGTypeface.cpp",
"tools/fonts/SkTestTypeface.cpp",
]
deps = [
":experimental_svg_model",
":flags",
":skia",
]
@ -179,18 +197,24 @@ test_app("api_raster_n32_canvas") {
include_dirs = [
"tools",
"tools/debugger",
"tools/fonts",
]
sources = [
"fuzz/Fuzz.cpp",
"fuzz/FuzzCanvas.cpp",
"fuzz/FuzzCommon.cpp",
"fuzz/oss_fuzz/FuzzRasterN32Canvas.cpp",
"tools/Resources.cpp",
"tools/UrlDataManager.cpp",
"tools/debugger/SkDebugCanvas.cpp",
"tools/debugger/SkDrawCommand.cpp",
"tools/debugger/SkJsonWriteBuffer.cpp",
"tools/fonts/SkTestFontMgr.cpp",
"tools/fonts/SkTestSVGTypeface.cpp",
"tools/fonts/SkTestTypeface.cpp",
]
deps = [
":experimental_svg_model",
":flags",
":gpu_tool_utils",
":skia",
@ -203,19 +227,25 @@ test_app("api_mock_gpu_canvas") {
include_dirs = [
"tools",
"tools/debugger",
"tools/fonts",
]
sources = [
"fuzz/Fuzz.cpp",
"fuzz/FuzzCanvas.cpp",
"fuzz/FuzzCommon.cpp",
"fuzz/oss_fuzz/FuzzMockGPUCanvas.cpp",
"tools/LsanSuppressions.cpp",
"tools/Resources.cpp",
"tools/UrlDataManager.cpp",
"tools/debugger/SkDebugCanvas.cpp",
"tools/debugger/SkDrawCommand.cpp",
"tools/debugger/SkJsonWriteBuffer.cpp",
"tools/LsanSuppressions.cpp"
"tools/fonts/SkTestFontMgr.cpp",
"tools/fonts/SkTestSVGTypeface.cpp",
"tools/fonts/SkTestTypeface.cpp",
]
deps = [
":experimental_svg_model",
":flags",
":gpu_tool_utils",
":skia",
@ -228,18 +258,24 @@ test_app("api_null_canvas") {
include_dirs = [
"tools",
"tools/debugger",
"tools/fonts",
]
sources = [
"fuzz/Fuzz.cpp",
"fuzz/FuzzCanvas.cpp",
"fuzz/FuzzCommon.cpp",
"fuzz/oss_fuzz/FuzzNullCanvas.cpp",
"tools/Resources.cpp",
"tools/UrlDataManager.cpp",
"tools/debugger/SkDebugCanvas.cpp",
"tools/debugger/SkDrawCommand.cpp",
"tools/debugger/SkJsonWriteBuffer.cpp",
"tools/fonts/SkTestFontMgr.cpp",
"tools/fonts/SkTestSVGTypeface.cpp",
"tools/fonts/SkTestTypeface.cpp",
]
deps = [
":experimental_svg_model",
":flags",
":gpu_tool_utils",
":skia",

View File

@ -60,17 +60,20 @@ export LDFLAGS_ARR=`echo $LDFLAGS | sed -e "s/\s/\",\"/g"`
$SRC/depot_tools/gn gen out/Fuzz\
--args='cc="'$CC'"
cxx="'$CXX'"
is_debug=false
extra_cflags_c=["'"$CFLAGS_ARR"'"]
extra_cflags_cc=["'"$CXXFLAGS_ARR"'"]
extra_ldflags=["'"$LDFLAGS_ARR"'"]
skia_use_egl=true
skia_use_system_freetype2=false
skia_use_fontconfig=false
skia_use_wuffs=true
skia_enable_gpu=true
skia_enable_skottie=true'
cxx="'$CXX'"
is_debug=false
extra_cflags_c=["'"$CFLAGS_ARR"'"]
extra_cflags_cc=["'"$CXXFLAGS_ARR"'"]
extra_ldflags=["'"$LDFLAGS_ARR"'"]
skia_enable_fontmgr_custom=false
skia_enable_fontmgr_custom_empty=true
skia_enable_gpu=true
skia_enable_skottie=true
skia_use_egl=true
skia_use_fontconfig=false
skia_use_freetype=true
skia_use_system_freetype2=false
skia_use_wuffs=true'
$SRC/depot_tools/gn gen out/Fuzz_mem_constraints\
--args='cc="'$CC'"
@ -79,12 +82,15 @@ $SRC/depot_tools/gn gen out/Fuzz_mem_constraints\
extra_cflags_c=["'"$CFLAGS_ARR"'"]
extra_cflags_cc=["'"$CXXFLAGS_ARR"'","-DIS_FUZZING"]
extra_ldflags=["'"$LDFLAGS_ARR"'"]
skia_use_egl=true
skia_use_system_freetype2=false
skia_use_fontconfig=false
skia_use_wuffs=true
skia_enable_fontmgr_custom=false
skia_enable_fontmgr_custom_empty=true
skia_enable_gpu=true
skia_enable_skottie=false'
skia_enable_skottie=true
skia_use_egl=true
skia_use_fontconfig=false
skia_use_freetype=true
skia_use_system_freetype2=false
skia_use_wuffs=true'
$SRC/depot_tools/ninja -C out/Fuzz region_deserialize region_set_path \
path_deserialize image_decode \
@ -199,4 +205,4 @@ cp ./image_decode_seed_corpus.zip $OUT/android_codec_seed_corpus.zip.
cp out/Fuzz/image_decode_incremental $OUT/image_decode_incremental
cp ./image_decode_incremental.options $OUT/image_decode_incremental.options
cp ./image_decode_seed_corpus.zip $OUT/image_decode_incremental_seed_corpus.zip
cp ./image_decode_seed_corpus.zip $OUT/image_decode_incremental_seed_corpus.zip