Commit c3f2a80d authored by bungeman's avatar bungeman Committed by Commit bot

Roll FreeType to 2.4.8 plus Ubuntu Precise patches.

BUG=chromium:269025

Review URL: https://codereview.chromium.org/612523005

Cr-Commit-Position: refs/heads/master@{#299249}
parent 9a04b3c3
...@@ -452,7 +452,7 @@ deps_os = { ...@@ -452,7 +452,7 @@ deps_os = {
# Note that this is different from Android's freetype repo. # Note that this is different from Android's freetype repo.
'src/third_party/freetype2/src': 'src/third_party/freetype2/src':
Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + 'd699c2994ecc178c4ed05ac2086061b2034c2178', Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '495a23fce9cd125f715dc20643d14fed226d76ac',
# Build tools for Chrome OS. # Build tools for Chrome OS.
'src/third_party/chromite': 'src/third_party/chromite':
......
...@@ -26,6 +26,7 @@ shared_library("freetype2") { ...@@ -26,6 +26,7 @@ shared_library("freetype2") {
"src/src/base/ftgxval.c", "src/src/base/ftgxval.c",
"src/src/base/ftinit.c", "src/src/base/ftinit.c",
"src/src/base/ftlcdfil.c", "src/src/base/ftlcdfil.c",
"src/src/base/ftmm.c",
"src/src/base/ftpfr.c", "src/src/base/ftpfr.c",
"src/src/base/ftstroke.c", "src/src/base/ftstroke.c",
"src/src/base/ftsynth.c", "src/src/base/ftsynth.c",
...@@ -58,7 +59,6 @@ shared_library("freetype2") { ...@@ -58,7 +59,6 @@ shared_library("freetype2") {
"FT_CONFIG_CONFIG_H=<ftconfig.h>", # See comments in README.chromium. "FT_CONFIG_CONFIG_H=<ftconfig.h>", # See comments in README.chromium.
"FT_CONFIG_MODULES_H=<ftmodule.h>", # See comments in README.chromium. "FT_CONFIG_MODULES_H=<ftmodule.h>", # See comments in README.chromium.
"FT_CONFIG_OPTIONS_H=<ftoption.h>", # See comments in README.chromium.
] ]
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
......
Name: freetype2 Name: freetype2
URL: git://git.sv.nongnu.org/freetype/freetype2.git URL: git://git.sv.nongnu.org/freetype/freetype2.git
Version: 2.3.11 Version: 2.4.8-1ubuntu2.1
Security Critical: no Security Critical: no
License: BSD License: BSD
License File: NOT_SHIPPED License File: NOT_SHIPPED
Description: Description:
This mirrors the version of Freetype2 that was distributed with Ubuntu Lucid This mirrors the version of Freetype2 that was distributed with Ubuntu Precise
(Version 2.3.11, git hash d699c2994ecc178c4ed05ac2086061b2034c2178, as seen (Version 2.4.8, git hash 9d7f0957fbd10fdbabf9815e37857a910ad4f4ac, plus
in https://launchpad.net/ubuntu/lucid/+source/freetype ). applicable debian/patches-freetype as seen in
https://launchpad.net/ubuntu/lucid/+source/freetype ). On Ubuntu Precise
this code should be the same as the result of
apt-get source freetype && cd freetype-2.4.8/ && ./debian/rules patch
The build files should approximate the output of
make -Bn | rev | cut -d ' ' -f 1 | rev | grep "\.c$" | sort
Currently the cache, validators, patent checker (no longer used), and bzip2
are excluded.
We link this library into DumpRenderTree so that we can run the layout tests We link this library into DumpRenderTree so that we can run the layout tests
on later versions of Ubuntu and still get the same font rendering so that on later versions of Ubuntu and still get the same font rendering so that
we don't have to support two sets of pixel test baselines. we don't have to support two sets of pixel test baselines.
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
'<(ft2_dir)/src/base/ftgasp.c', '<(ft2_dir)/src/base/ftgasp.c',
'<(ft2_dir)/src/base/ftgxval.c', '<(ft2_dir)/src/base/ftgxval.c',
'<(ft2_dir)/src/base/ftlcdfil.c', '<(ft2_dir)/src/base/ftlcdfil.c',
'<(ft2_dir)/src/base/ftmm.c',
'<(ft2_dir)/src/base/ftpfr.c', '<(ft2_dir)/src/base/ftpfr.c',
'<(ft2_dir)/src/base/ftstroke.c', '<(ft2_dir)/src/base/ftstroke.c',
'<(ft2_dir)/src/base/ftsynth.c', '<(ft2_dir)/src/base/ftsynth.c',
...@@ -68,7 +69,6 @@ ...@@ -68,7 +69,6 @@
'FT2_BUILD_LIBRARY', 'FT2_BUILD_LIBRARY',
'FT_CONFIG_CONFIG_H=<ftconfig.h>', # See comments in README.chromium. 'FT_CONFIG_CONFIG_H=<ftconfig.h>', # See comments in README.chromium.
'FT_CONFIG_MODULES_H=<ftmodule.h>', # See comments in README.chromium. 'FT_CONFIG_MODULES_H=<ftmodule.h>', # See comments in README.chromium.
'FT_CONFIG_OPTIONS_H=<ftoption.h>', # See comments in README.chromium.
], ],
'include_dirs': [ 'include_dirs': [
'include', 'include',
......
...@@ -26,25 +26,3 @@ index 9ea3546..16f8854 100644 ...@@ -26,25 +26,3 @@ index 9ea3546..16f8854 100644
#endif #endif
#endif /* !FT_EXPORT_DEF */ #endif /* !FT_EXPORT_DEF */
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 759b3a3..f921a04 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/*************************************************************************/
@@ -495,7 +495,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
/* */ /* */
/* UNIX-specific configuration file (specification only). */ /* UNIX-specific configuration file (specification only). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ /* Copyright 1996-2004, 2006-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
...@@ -118,10 +118,6 @@ FT_BEGIN_HEADER ...@@ -118,10 +118,6 @@ FT_BEGIN_HEADER
#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ #endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
/* Preferred alignment of data */
#define FT_ALIGNMENT 8
/* FT_UNUSED is a macro used to indicate that a given parameter is not */ /* FT_UNUSED is a macro used to indicate that a given parameter is not */
/* used -- this is only used to get rid of unpleasant compiler warnings */ /* used -- this is only used to get rid of unpleasant compiler warnings */
#ifndef FT_UNUSED #ifndef FT_UNUSED
...@@ -150,7 +146,12 @@ FT_BEGIN_HEADER ...@@ -150,7 +146,12 @@ FT_BEGIN_HEADER
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
( defined( __MWERKS__ ) && defined( macintosh ) ) ( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */ /* no Carbon frameworks for 64bit 10.4.x */
/* AvailabilityMacros.h is available since Mac OS X 10.2, */
/* so guess the system version by maximum errno before inclusion */
#include <errno.h>
#ifdef ECANCELED /* defined since 10.2 */
#include "AvailabilityMacros.h" #include "AvailabilityMacros.h"
#endif
#if defined( __LP64__ ) && \ #if defined( __LP64__ ) && \
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
#define DARWIN_NO_CARBON 1 #define DARWIN_NO_CARBON 1
...@@ -287,11 +288,42 @@ FT_BEGIN_HEADER ...@@ -287,11 +288,42 @@ FT_BEGIN_HEADER
/* Provide assembler fragments for performance-critical functions. */ /* Provide assembler fragments for performance-critical functions. */
/* These must be defined `static __inline__' with GCC. */ /* These must be defined `static __inline__' with GCC. */
#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
__asm
{
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
mov a, t, asr #31 /* a = (hi >> 31) */
add a, a, #0x8000 /* a += 0x8000 */
adds t2, t2, a /* t2 += a */
adc t, t, #0 /* t += carry */
mov a, t2, lsr #16 /* a = t2 >> 16 */
orr a, a, t, lsl #16 /* a |= t << 16 */
}
return a;
}
#endif /* __CC_ARM || __ARMCC__ */
#ifdef __GNUC__ #ifdef __GNUC__
#if defined( __arm__ ) && !defined( __thumb__ ) #if defined( __arm__ ) && !defined( __thumb__ ) && \
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm #define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline__ FT_Int32 static __inline__ FT_Int32
FT_MulFix_arm( FT_Int32 a, FT_MulFix_arm( FT_Int32 a,
FT_Int32 b ) FT_Int32 b )
...@@ -312,11 +344,13 @@ FT_BEGIN_HEADER ...@@ -312,11 +344,13 @@ FT_BEGIN_HEADER
return a; return a;
} }
#endif /* __arm__ && !__thumb__ */ #endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
#if defined( i386 ) #if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline__ FT_Int32 static __inline__ FT_Int32
FT_MulFix_i386( FT_Int32 a, FT_MulFix_i386( FT_Int32 a,
FT_Int32 b ) FT_Int32 b )
...@@ -334,9 +368,9 @@ FT_BEGIN_HEADER ...@@ -334,9 +368,9 @@ FT_BEGIN_HEADER
"shrl $16, %%eax\n" "shrl $16, %%eax\n"
"shll $16, %%edx\n" "shll $16, %%edx\n"
"addl %%edx, %%eax\n" "addl %%edx, %%eax\n"
: "=a"(result), "+d"(b) : "=a"(result), "=d"(b)
: "a"(a) : "a"(a), "d"(b)
: "%ecx" ); : "%ecx", "cc" );
return result; return result;
} }
...@@ -344,6 +378,43 @@ FT_BEGIN_HEADER ...@@ -344,6 +378,43 @@ FT_BEGIN_HEADER
#endif /* __GNUC__ */ #endif /* __GNUC__ */
#ifdef _MSC_VER /* Visual C++ */
#ifdef _M_IX86
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 result;
__asm
{
mov eax, a
mov edx, b
imul edx
mov ecx, edx
sar ecx, 31
add ecx, 8000h
add eax, ecx
adc edx, 0
shr eax, 16
shl edx, 16
add eax, edx
mov result, eax
}
return result;
}
#endif /* _M_IX86 */
#endif /* _MSC_VER */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ #endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment