Changeset 3585 for libcaca/trunk


Ignore:
Timestamp:
Jul 27, 2009, 1:25:59 AM (10 years ago)
Author:
Sam Hocevar
Message:

Show how we could optimise dirty rectangle handling in a box fill. Disabled
for now because it does not work with fullwidth characters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/box.c

    r3447 r3585  
    11/*
    22 *  libcaca       Colour ASCII-Art library
    3  *  Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
     3 *  Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
    44 *                All Rights Reserved
    55 *
     
    140140    if(y2 > ymax) y2 = ymax;
    141141
     142#if 0
     143    /* FIXME: this fails with fullwidth character blits. Also, the dirty
     144     * rectangle handling may miss fullwidth cells. */
     145    /* Optimise dirty rectangle handling, part 1 */
     146    cv->dirty_disabled++;
     147#endif
     148
    142149    for(j = y; j <= y2; j++)
    143150        for(i = x; i <= x2; i++)
    144151            caca_put_char(cv, i, j, ch);
     152
     153#if 0
     154    /* Optimise dirty rectangle handling, part 2 */
     155    cv->dirty_disabled--;
     156    if(!cv->dirty_disabled)
     157        caca_add_dirty_rect(cv, x, y, x2 - x + 1, y2 - y + 1);
     158#endif
    145159
    146160    return 0;
Note: See TracChangeset for help on using the changeset viewer.