Преглед на файлове

Show how we could optimise dirty rectangle handling in a box fill. Disabled

for now because it does not work with fullwidth characters.
tags/v0.99.beta17
Sam Hocevar sam преди 15 години
родител
ревизия
60b44cc5be
променени са 1 файла, в които са добавени 15 реда и са изтрити 1 реда
  1. +15
    -1
      caca/box.c

+ 15
- 1
caca/box.c Целия файл

@@ -1,6 +1,6 @@
/*
* libcaca Colour ASCII-Art library
* Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
* Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
* All Rights Reserved
*
* $Id$
@@ -139,10 +139,24 @@ int caca_fill_box(caca_canvas_t *cv, int x, int y, int w, int h,
if(x2 > xmax) x2 = xmax;
if(y2 > ymax) y2 = ymax;

#if 0
/* FIXME: this fails with fullwidth character blits. Also, the dirty
* rectangle handling may miss fullwidth cells. */
/* Optimise dirty rectangle handling, part 1 */
cv->dirty_disabled++;
#endif

for(j = y; j <= y2; j++)
for(i = x; i <= x2; i++)
caca_put_char(cv, i, j, ch);

#if 0
/* Optimise dirty rectangle handling, part 2 */
cv->dirty_disabled--;
if(!cv->dirty_disabled)
caca_add_dirty_rect(cv, x, y, x2 - x + 1, y2 - y + 1);
#endif

return 0;
}



Зареждане…
Отказ
Запис