freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 2 commits: * src/smooth/ftgrays.c (FT_G


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 2 commits: * src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code.
Date: Wed, 12 May 2021 21:25:39 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    -2021-05-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    1
    +2021-05-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	* src/smooth/ftgrays.c (FT_MAX_GRAY_SPANS): Increase from 10 to 16.
    
    4
    +
    
    5
    +	Ten was barely enough for two slanted stems. Sixteen can actually fit
    
    6
    +	a bit more complicated scanlines.
    
    7
    +
    
    8
    +2021-05-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    9
    +
    
    10
    +	* src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code.
    
    11
    +
    
    12
    +2021-05-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2 13
     
    
    3 14
     	[smooth] Faster bitmap sweeping.
    
    4 15
     
    

  • src/smooth/ftgrays.c
    ... ... @@ -409,22 +409,21 @@ typedef ptrdiff_t FT_PtrDist;
    409 409
     
    
    410 410
       /* It is faster to write small spans byte-by-byte than calling     */
    
    411 411
       /* `memset'.  This is mainly due to the cost of the function call. */
    
    412
    -#define FT_GRAY_SET( d, s, count )           \
    
    413
    -  FT_BEGIN_STMNT                             \
    
    414
    -    unsigned char* q = d;                    \
    
    415
    -    unsigned char  c = (unsigned char)s;     \
    
    416
    -    switch ( count )                         \
    
    417
    -    {                                        \
    
    418
    -      case 7: *q++ = c; /* fall through */   \
    
    419
    -      case 6: *q++ = c; /* fall through */   \
    
    420
    -      case 5: *q++ = c; /* fall through */   \
    
    421
    -      case 4: *q++ = c; /* fall through */   \
    
    422
    -      case 3: *q++ = c; /* fall through */   \
    
    423
    -      case 2: *q++ = c; /* fall through */   \
    
    424
    -      case 1: *q   = c; /* fall through */   \
    
    425
    -      case 0: break;                         \
    
    426
    -      default: FT_MEM_SET( d, s, count );    \
    
    427
    -    }                                        \
    
    412
    +#define FT_GRAY_SET( d, s, count )                          \
    
    413
    +  FT_BEGIN_STMNT                                            \
    
    414
    +    unsigned char* q = d;                                   \
    
    415
    +    switch ( count )                                        \
    
    416
    +    {                                                       \
    
    417
    +      case 7: *q++ = (unsigned char)s; /* fall through */   \
    
    418
    +      case 6: *q++ = (unsigned char)s; /* fall through */   \
    
    419
    +      case 5: *q++ = (unsigned char)s; /* fall through */   \
    
    420
    +      case 4: *q++ = (unsigned char)s; /* fall through */   \
    
    421
    +      case 3: *q++ = (unsigned char)s; /* fall through */   \
    
    422
    +      case 2: *q++ = (unsigned char)s; /* fall through */   \
    
    423
    +      case 1: *q   = (unsigned char)s; /* fall through */   \
    
    424
    +      case 0: break;                                        \
    
    425
    +      default: FT_MEM_SET( d, s, count );                   \
    
    426
    +    }                                                       \
    
    428 427
       FT_END_STMNT
    
    429 428
     
    
    430 429
     
    
    ... ... @@ -468,7 +467,7 @@ typedef ptrdiff_t FT_PtrDist;
    468 467
     #endif
    
    469 468
     
    
    470 469
       /* FT_Span buffer size for direct rendering only */
    
    471
    -#define FT_MAX_GRAY_SPANS  10
    
    470
    +#define FT_MAX_GRAY_SPANS  16
    
    472 471
     
    
    473 472
     
    
    474 473
     #if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
    


  • reply via email to

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