Changeset 3505 for libcaca/trunk


Ignore:
Timestamp:
May 22, 2009, 12:18:44 PM (11 years ago)
Author:
Sam Hocevar
Message:

caca_put_char(): only add a dirty rectangle if the paster character is
different from what was already there.

File:
1 edited

Legend:

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

    r3494 r3505  
    177177    }
    178178
    179     caca_add_dirty_rect(cv, xmin, y, xmax - xmin + 1, 1);
     179    /* Only add a dirty rectangle if we are pasting a different character
     180     * or attribute at that place. This does not account for inconsistencies
     181     * in the canvas, ie. if CACA_MAGIC_FULLWIDTH lies at illegal places,
     182     * but it's the caller's responsibility not to corrupt the contents. */
     183    if(curchar[0] != ch || curattr[0] != attr)
     184        caca_add_dirty_rect(cv, xmin, y, xmax - xmin + 1, 1);
    180185
    181186    curchar[0] = ch;
Note: See TracChangeset for help on using the changeset viewer.