summaryrefslogtreecommitdiffstats
path: root/src/pshinter/pshalgo.c
diff options
context:
space:
mode:
authorJungshik Shin <jungshik@google.com>2016-01-15 16:18:25 -0800
committerThe Android Automerger <android-build@google.com>2016-02-24 13:20:13 -0800
commitf720f0dbcf012d6c984dbbefa0875ef9840458c6 (patch)
treebdb1068e64623c623100071dc586117aba4a2417 /src/pshinter/pshalgo.c
parentec62c527eb34ee4481a0153ceb42dfd35d7e1d26 (diff)
downloadandroid_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.tar.gz
android_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.tar.bz2
android_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.zip
[DO NOT MERGE] Update FreeType to 2.6.2 + update from 2.6.0
1. Update to a512b0fe7a (several patches past 2.6.2). Major changes include - stem-darkening is OFF for CFF fonts by default - general code tightening - header file location is back to include/freetype (used be include/) 2. A bit more details are added to README.android for the reference. This CL requires a pdfium change (the way it includes FT header files : https://googleplex-android-review.git.corp.google.com/#/c/846889 An AOSP master CL (https://android-review.googlesource.com/#/c/196504/) is ported to mnc-dev. Bug: 24296662 Change-Id: Iec6784838d89098f332e6d1ed79663efd91a8441 Signed-off-by: Jungshik Shin <jungshik@google.com>
Diffstat (limited to 'src/pshinter/pshalgo.c')
-rw-r--r--src/pshinter/pshalgo.c94
1 files changed, 0 insertions, 94 deletions
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index bfdb3ed..6e654cb 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -916,103 +916,9 @@
/*************************************************************************/
/*************************************************************************/
-#if 1
-
#define psh_corner_is_flat ft_corner_is_flat
#define psh_corner_orientation ft_corner_orientation
-#else
-
- FT_LOCAL_DEF( FT_Int )
- psh_corner_is_flat( FT_Pos x_in,
- FT_Pos y_in,
- FT_Pos x_out,
- FT_Pos y_out )
- {
- FT_Pos ax = x_in;
- FT_Pos ay = y_in;
-
- FT_Pos d_in, d_out, d_corner;
-
-
- if ( ax < 0 )
- ax = -ax;
- if ( ay < 0 )
- ay = -ay;
- d_in = ax + ay;
-
- ax = x_out;
- if ( ax < 0 )
- ax = -ax;
- ay = y_out;
- if ( ay < 0 )
- ay = -ay;
- d_out = ax + ay;
-
- ax = x_out + x_in;
- if ( ax < 0 )
- ax = -ax;
- ay = y_out + y_in;
- if ( ay < 0 )
- ay = -ay;
- d_corner = ax + ay;
-
- return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );
- }
-
- static FT_Int
- psh_corner_orientation( FT_Pos in_x,
- FT_Pos in_y,
- FT_Pos out_x,
- FT_Pos out_y )
- {
- FT_Int result;
-
-
- /* deal with the trivial cases quickly */
- if ( in_y == 0 )
- {
- if ( in_x >= 0 )
- result = out_y;
- else
- result = -out_y;
- }
- else if ( in_x == 0 )
- {
- if ( in_y >= 0 )
- result = -out_x;
- else
- result = out_x;
- }
- else if ( out_y == 0 )
- {
- if ( out_x >= 0 )
- result = in_y;
- else
- result = -in_y;
- }
- else if ( out_x == 0 )
- {
- if ( out_y >= 0 )
- result = -in_x;
- else
- result = in_x;
- }
- else /* general case */
- {
- long long delta = (long long)in_x * out_y - (long long)in_y * out_x;
-
- if ( delta == 0 )
- result = 0;
- else
- result = 1 - 2 * ( delta < 0 );
- }
-
- return result;
- }
-
-#endif /* !1 */
-
#ifdef COMPUTE_INFLEXS