freetype-devel
[Top][All Lists]
Advanced

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

[Devel] FreeType performance issue.


From: 강 재민
Subject: [Devel] FreeType performance issue.
Date: Tue, 21 Dec 2004 13:07:42 +0900

After changing FreeType library source code a little, I tested it on ARM7 platform and got this result.
 
Test String : "The coalition, called the United Iraqi Alliance, is backed by Grand A"
Font Size : (20 << 6) X (20 << 6), 72DPI
Render Mode : Antialiased.
 
It took 1550 milisecond to Load_Glyph and Render_Glyph above test string(except physical lcd access routine).
This performance result doesn't meet my goal so I'm looking for some parts to be optimized, something like below.
 
 
 
In 'ftgrays.c ' file, the 'gray_convert_glyph' function calls 'gray_compute_cbox' function first to get an glyph boundary.
 
*gray_compute_cbox function costs O(n) - n is the number of points
 
But in this time, I think FreeType can use (raster->target).width, (raster->target).height.
I think the code can be changed like this
 
  static int
  gray_convert_glyph( RAS_ARG )
  {
    TBand            bands[40];
    TBand* volatile  band;
    int volatile     n, num_bands;
    TPos volatile    min, max, max_y;
    FT_BBox*         clip;
 

    /* Set up state in the raster object */
    /*gray_compute_cbox( RAS_VAR );*/                // Don't need
    raster->min_ex = 0;                              // Added
    raster->max_ex = (raster->target).width;         // Added
    raster->min_ey = 0;                              // Added
    raster->max_ey = (raster->target).height;        // Added
    ...
 
 
Would you tell me if there is any reason that I can't do like this?
 
I'm going to inspect all glyph points iteration code to optimize.
 
And any opinions about performance would be helpful... thank you.
 
 
 
 
 
 
 
 

 
 

reply via email to

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