Ignore:
Timestamp:
Jul 26, 2009, 9:17:35 PM (11 years ago)
Author:
Sam Hocevar
Message:

Allow to temporarily disable dirty rectangle handling. This allows for huge
speedups when the calling application knows the dirty rectangle covered by
a complex operation.

File:
1 edited

Legend:

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

    r3568 r3583  
    434434        }
    435435
    436         caca_add_dirty_rect(cv, old_width, 0, width - old_width, old_height);
     436        if(!cv->dirty_disabled)
     437            caca_add_dirty_rect(cv, old_width, 0,
     438                                width - old_width, old_height);
    437439    }
    438440    else
     
    475477        }
    476478
    477         caca_add_dirty_rect(cv, 0, old_height, old_width, height - old_height);
     479        if(!cv->dirty_disabled)
     480            caca_add_dirty_rect(cv, 0, old_height,
     481                                old_width, height - old_height);
    478482    }
    479483
    480484    /* If both width and height are larger, there is a new dirty rectangle
    481485     * that needs to be created in the lower right corner. */
    482     if(width > old_width && height > old_height)
     486    if(!cv->dirty_disabled &&
     487        width > old_width && height > old_height)
    483488        caca_add_dirty_rect(cv, old_width, old_height,
    484489                            width - old_width, height - old_height);
Note: See TracChangeset for help on using the changeset viewer.