Skip to content
Snippets Groups Projects
Commit d4c96604 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Some X client optimizations.

- Only call cb_flush() if a new rect was queued.
- Ensure bitmap_drv_request_some_pixels() is only called once in
  response to an expose request.

This should fix issue #565.
parent 87f05b6d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4286 passed
......@@ -722,11 +722,11 @@ static void blinker_thread(void *data)
screen->update_pixels = 0;
pthread_mutex_unlock(&screenlock);
cb_drawrect(rect);
cb_flush();
}
else {
pthread_mutex_unlock(&screenlock);
}
cb_flush();
}
}
......
......@@ -805,10 +805,12 @@ static void expose_rect(int x, int y, int width, int height)
last = NULL;
bitmap_drv_request_some_pixels(sx, sy, ex-sx+1, ey-sy+1);
}
// Do nothing...
if (sx == ex || sy == ey)
return;
bitmap_drv_request_some_pixels(sx, sy, ex-sx+1, ey-sy+1);
else {
// Do nothing...
if (sx == ex || sy == ey)
return;
bitmap_drv_request_some_pixels(sx, sy, ex-sx+1, ey-sy+1);
}
}
static bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment