浏览代码

Only redraw empty rectangles in slang driver

tags/v0.99.beta17
Pascal Terjan pterjan 15 年前
父节点
当前提交
ee3018643d
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. +7
    -4
      caca/driver/slang.c

+ 7
- 4
caca/driver/slang.c 查看文件

@@ -222,14 +222,17 @@ static void slang_display(caca_display_t *dp)
{
uint32_t const *cvchars = (uint32_t const *)caca_get_canvas_chars(dp->cv);
uint32_t const *cvattrs = (uint32_t const *)caca_get_canvas_attrs(dp->cv);
int width = caca_get_canvas_width(dp->cv);
int height = caca_get_canvas_height(dp->cv);
int x, y;
int xmin, ymin, xmax, ymax;

for(y = 0; y < (int)height; y++)
caca_get_dirty_rectangle(dp->cv, &xmin, &ymin, &xmax, &ymax);
if(xmin > xmax || ymin > ymax)
return;

for(y = ymin; y <= ymax; y++)
{
SLsmg_gotorc(y, 0);
for(x = width; x--; )
for(x = xmax; x >= xmin; x--)
{
uint32_t ch = *cvchars++;



正在加载...
取消
保存