freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype-demos][master] [graph] Explain the blender cache


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] [graph] Explain the blender cache.
Date: Fri, 20 Jan 2023 15:50:00 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs

Commits:

  • 4ec7c98f
    by Alexei Podtelezhnikov at 2023-01-20T15:49:56+00:00
    [graph] Explain the blender cache.

2 changed files:

Changes:

  • graph/gblblit.c
    ... ... @@ -9,13 +9,16 @@
    9 9
     /*                                                                          */
    
    10 10
     /****************************************************************************/
    
    11 11
     
    
    12
    +/* The cached color gradients from the back- to foreground color are used
    
    13
    + * to quickly look up the blended color for a given pixel coverage (alpha).
    
    14
    + * They are calculated with gamma correction and stored with 8-bit depth
    
    15
    + * per channel, in the range [0-255]. Other supported color representations
    
    16
    + * require scaling to utilize the cache.
    
    17
    + */
    
    12 18
     
    
    13 19
     #include "grobjs.h"
    
    14 20
     #include "gblblit.h"
    
    15 21
     
    
    16
    -/* blitting gray glyphs
    
    17
    - */
    
    18
    -
    
    19 22
     /* generic macros
    
    20 23
      */
    
    21 24
     #define  GRGB_PACK(r,g,b)      ( ((GBlenderPixel)(r) << 16) | \
    
    ... ... @@ -206,7 +209,7 @@
    206 209
     
    
    207 210
     #include "gblany.h"
    
    208 211
     
    
    209
    -/* Gray8 blitting routines
    
    212
    +/* Gray8 blitting routines, only 8-bit gray is supported
    
    210 213
      */
    
    211 214
     #define  GDST_TYPE               gray8
    
    212 215
     #define  GDST_INCR               1
    

  • graph/gblender.c
    1
    +/****************************************************************************/
    
    2
    +/*                                                                          */
    
    3
    +/*  The FreeType project -- a free and portable quality TrueType renderer.  */
    
    4
    +/*                                                                          */
    
    5
    +/*  Copyright (C) 1996-2023 by                                              */
    
    6
    +/*  D. Turner, R.Wilhelm, and W. Lemberg                                    */
    
    7
    +/*                                                                          */
    
    8
    +/*  gblender.c: Alpha blending with gamma correction and caching.           */
    
    9
    +/*                                                                          */
    
    10
    +/****************************************************************************/
    
    11
    +
    
    12
    +/* The cached color gradients from the back- to foreground color are used
    
    13
    + * to quickly look up the blended color for a given pixel coverage (alpha).
    
    14
    + * They are calculated with gamma correction and stored with 8-bit depth
    
    15
    + * per channel, in the range [0-255]. Other supported color representations
    
    16
    + * require scaling to utilize the cache.
    
    17
    + */
    
    18
    +
    
    1 19
     #include "gblender.h"
    
    2 20
     #include <stdlib.h>
    
    3 21
     
    


  • reply via email to

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