Revert of Remove SK_FREETYPE_HAS_MM. (patchset #1 id:1 of https://codereview.chromium.org/1143133006/)

Reason for revert:
seems to be breaking DEPS roll

FAILED: /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -fuse-ld=gold -Wl,--no-undefined -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a -Wl,--icf=safe -Wl,--warn-shared-textrel -nostdlib --sysroot=/b/build/slave/android_chromium_gn/build/src/third_party/android_tools/ndk/platforms/android-14/arch-arm  -Wl,--warn-shared-textrel -Wl,-O1 -Wl,--gc-sections -Wl,--as-needed -Wl,--version-script=/b/build/slave/android_chromium_gn/build/src/build/android/android_no_jni_exports.lst -L../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -o ./libskia.so -Wl,-soname=libskia.so @./libskia.so.rsp && { /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-readelf -d ./libskia.so | grep SONAME ; /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm -gD -f p ./libskia.so | cut -f1-2 -d' '; } > ./libskia.so.tmp && if ! cmp -s ./libskia.so.tmp ./libskia.so.TOC; then mv ./libskia.so.tmp ./libskia.so.TOC; fi && mkdir -p lib.stripped && ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded -o lib.stripped/libskia.so.tmp libskia.so && if ! cmp -s lib.stripped/libskia.so.tmp lib.stripped/libskia.so; then mv lib.stripped/libskia.so.tmp lib.stripped/libskia.so; fi
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:283: error: undefined reference to 'FT_Get_MM_Var'
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:302: error: undefined reference to 'FT_Set_Var_Design_Coordinates'
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:1766: error: undefined reference to 'FT_Get_MM_Var'
collect2: error: ld returned 1 exit status

Original issue's description:
> Remove SK_FREETYPE_HAS_MM.
>
> The SK_FREETYPE_HAS_MM define was added to delay the changes to
> support GX variation fonts on platforms which did not compile ftmm.c
> into their FreeType build. Now that all builds should have this file
> the define can be removed.
>
> Committed: https://skia.googlesource.com/skia/+/4f61fee53af956a8beb4c56fa6479cb6b1aa5159

TBR=djsollen@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1148303005
This commit is contained in:
reed 2015-06-01 18:40:52 -07:00 committed by Commit bot
parent 8b08159aa7
commit c657b6932b

View File

@ -42,6 +42,10 @@
#include FT_TYPE1_TABLES_H
#include FT_XFREE86_H
#if !defined(SK_BUILD_FOR_ANDROID) || defined(SK_ANDROID_FREETYPE_HAS_MM)
# define SK_FREETYPE_HAS_MM 1
#endif
// FT_LOAD_COLOR and the corresponding FT_Pixel_Mode::FT_PIXEL_MODE_BGRA
// were introduced in FreeType 2.5.0.
// The following may be removed once FreeType 2.5.0 is required to build.
@ -275,6 +279,7 @@ SkFaceRec::SkFaceRec(SkStreamAsset* stream, uint32_t fontID)
fFTStream.close = sk_ft_stream_close;
}
#if SK_FREETYPE_HAS_MM
static void ft_face_setup_axes(FT_Face face, const SkFontData& data) {
if (!(face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS)) {
return;
@ -305,6 +310,7 @@ static void ft_face_setup_axes(FT_Face face, const SkFontData& data) {
return;
}
}
#endif
// Will return 0 on failure
// Caller must lock gFTMutex before calling this function.
@ -350,7 +356,9 @@ static SkFaceRec* ref_ft_face(const SkTypeface* typeface) {
}
SkASSERT(rec->fFace);
#if SK_FREETYPE_HAS_MM
ft_face_setup_axes(rec->fFace, *data);
#endif
rec->fNext = gFaceRecHead;
gFaceRecHead = rec;
@ -1761,6 +1769,7 @@ bool SkTypeface_FreeType::Scanner::scanFont(
*isFixedPitch = FT_IS_FIXED_WIDTH(face);
}
#if SK_FREETYPE_HAS_MM
if (axes && face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
FT_MM_Var* variations = NULL;
FT_Error err = FT_Get_MM_Var(face, &variations);
@ -1780,6 +1789,7 @@ bool SkTypeface_FreeType::Scanner::scanFont(
(*axes)[i].fMaximum = ftAxis.maximum;
}
}
#endif
FT_Done_Face(face);
return true;