freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] 3 commits: * include/freetype/internal/


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 3 commits: * include/freetype/internal/compiler-macros.h [FT_COMPARE_DEF]: Tighten.
Date: Sat, 15 Jan 2022 03:12:47 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

4 changed files:

Changes:

  • include/freetype/config/integer-types.h
    ... ... @@ -221,9 +221,10 @@
    221 221
     #define FT_INT64   __int64
    
    222 222
     #define FT_UINT64  unsigned __int64
    
    223 223
     
    
    224
    -#elif defined( __WATCOMC__ )   /* Watcom C++ */
    
    224
    +#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100  /* Watcom C++ */
    
    225 225
     
    
    226
    -  /* Watcom doesn't provide 64-bit data types */
    
    226
    +#define FT_INT64   long long int
    
    227
    +#define FT_UINT64  unsigned long long int
    
    227 228
     
    
    228 229
     #elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
    
    229 230
     
    

  • include/freetype/internal/compiler-macros.h
    ... ... @@ -299,9 +299,9 @@ FT_BEGIN_HEADER
    299 299
     #define FT_CALLBACK_DEF( x )  static  x
    
    300 300
     #endif
    
    301 301
     
    
    302
    -#if defined( __i386__ )
    
    302
    +#if defined( __GNUC__ ) && defined( __i386__ )
    
    303 303
     #define FT_COMPARE_DEF( x )  FT_CALLBACK_DEF( x ) __attribute__(( cdecl ))
    
    304
    -#elif defined( _M_IX86 )
    
    304
    +#elif defined( _MSC_VER ) && defined( _M_IX86 )
    
    305 305
     #define FT_COMPARE_DEF( x )  FT_CALLBACK_DEF( x ) __cdecl
    
    306 306
     #else
    
    307 307
     #define FT_COMPARE_DEF( x )  FT_CALLBACK_DEF( x )
    

  • include/freetype/internal/ftcalc.h
    ... ... @@ -408,6 +408,19 @@ FT_BEGIN_HEADER
    408 408
     
    
    409 409
     #endif
    
    410 410
     
    
    411
    +#elif defined( __WATCOMC__ ) && defined( __386__ )
    
    412
    +
    
    413
    +  extern __inline FT_Int32
    
    414
    +  FT_MSB_i386( FT_UInt32  x );
    
    415
    +
    
    416
    +#pragma aux FT_MSB_i386 =     \
    
    417
    +  "bsr eax, eax"              \
    
    418
    +  parm [eax] nomemory         \
    
    419
    +  value [eax]                 \
    
    420
    +  modify exact [eax] nomemory;
    
    421
    +
    
    422
    +#define FT_MSB( x )  FT_MSB_i386( x )
    
    423
    +
    
    411 424
     #elif defined( __DECC ) || defined( __DECCXX )
    
    412 425
     
    
    413 426
     #include <builtins.h>
    

  • src/sdf/ftbsdf.c
    ... ... @@ -177,11 +177,11 @@
    177 177
        *
    
    178 178
        * @Fields:
    
    179 179
        *   dist ::
    
    180
    -   *     Vector length of the `near` parameter.  Can be squared or absolute
    
    180
    +   *     Vector length of the `prox` parameter.  Can be squared or absolute
    
    181 181
        *     depending on the `USE_SQUARED_DISTANCES` macro defined in file
    
    182 182
        *     `ftsdfcommon.h`.
    
    183 183
        *
    
    184
    -   *   near ::
    
    184
    +   *   prox ::
    
    185 185
        *     Vector to the nearest edge.  Can also be interpreted as shortest
    
    186 186
        *     distance of a point.
    
    187 187
        *
    
    ... ... @@ -194,7 +194,7 @@
    194 194
       typedef struct  ED_
    
    195 195
       {
    
    196 196
         FT_16D16      dist;
    
    197
    -    FT_16D16_Vec  near;
    
    197
    +    FT_16D16_Vec  prox;
    
    198 198
         FT_Byte       alpha;
    
    199 199
     
    
    200 200
       } ED;
    
    ... ... @@ -595,18 +595,18 @@
    595 595
                                worker->rows ) )
    
    596 596
             {
    
    597 597
               /* approximate the edge distance for edge pixels */
    
    598
    -          ed[index].near = compute_edge_distance( ed + index,
    
    598
    +          ed[index].prox = compute_edge_distance( ed + index,
    
    599 599
                                                       i, j,
    
    600 600
                                                       worker->width,
    
    601 601
                                                       worker->rows );
    
    602
    -          ed[index].dist = VECTOR_LENGTH_16D16( ed[index].near );
    
    602
    +          ed[index].dist = VECTOR_LENGTH_16D16( ed[index].prox );
    
    603 603
             }
    
    604 604
             else
    
    605 605
             {
    
    606 606
               /* for non-edge pixels assign far away distances */
    
    607 607
               ed[index].dist   = 400 * ONE;
    
    608
    -          ed[index].near.x = 200 * ONE;
    
    609
    -          ed[index].near.y = 200 * ONE;
    
    608
    +          ed[index].prox.x = 200 * ONE;
    
    609
    +          ed[index].prox.y = 200 * ONE;
    
    610 610
             }
    
    611 611
           }
    
    612 612
         }
    
    ... ... @@ -871,7 +871,7 @@
    871 871
     
    
    872 872
         if ( dist < current->dist )
    
    873 873
         {
    
    874
    -      dist_vec = to_check->near;
    
    874
    +      dist_vec = to_check->prox;
    
    875 875
     
    
    876 876
           dist_vec.x += x_offset * ONE;
    
    877 877
           dist_vec.y += y_offset * ONE;
    
    ... ... @@ -880,7 +880,7 @@
    880 880
           if ( dist < current->dist )
    
    881 881
           {
    
    882 882
             current->dist = dist;
    
    883
    -        current->near = dist_vec;
    
    883
    +        current->prox = dist_vec;
    
    884 884
           }
    
    885 885
         }
    
    886 886
       }
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]