Ignore:
Timestamp:
May 14, 2009, 2:18:23 AM (11 years ago)
Author:
Sam Hocevar
Message:

Finish the dirty rectangle architecture. They are now reliable in the sense
that anything outside the dirty rectangle is guaranteed to be unchanged, but
we currently mark far too many cells as dirty. This must be optimised.

File:
1 edited

Legend:

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

    r2826 r3448  
    131131{
    132132    uint32_t *curattr, *curchar;
     133    int xmin, xmax;
    133134
    134135    if(x < 0 || x >= (int)cv->width || y < 0 || y >= (int)cv->height)
    135136        return 0;
     137
     138    xmin = xmax = x;
    136139
    137140    curchar = cv->chars + x + y * cv->width;
     
    144147
    145148    if(x && curchar[0] == CACA_MAGIC_FULLWIDTH)
     149    {
    146150        curattr[-1] = curattr[0];
     151        xmin--;
     152    }
    147153    else if(x + 1 < (int)cv->width && curchar[1] == CACA_MAGIC_FULLWIDTH)
     154    {
    148155        curattr[1] = curattr[0];
     156        xmax++;
     157    }
     158
     159    caca_add_dirty_rectangle(cv, xmin, xmax, y, y);
    149160
    150161    return 0;
Note: See TracChangeset for help on using the changeset viewer.