mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 06:28:01 +02:00
simple-shm: Don't attach the buffer to the surface for every redraw
This will allow us to change just a sub region of the buffer.
This commit is contained in:
parent
70f83679ee
commit
fecf332e19
1 changed files with 1 additions and 1 deletions
|
|
@ -209,7 +209,6 @@ redraw(void *data, struct wl_callback *callback, uint32_t time)
|
|||
struct window *window = data;
|
||||
|
||||
paint_pixels(window->shm_data, window->width, window->height, time);
|
||||
wl_surface_attach(window->surface, window->buffer, 0, 0);
|
||||
wl_surface_damage(window->surface,
|
||||
0, 0, window->width, window->height);
|
||||
|
||||
|
|
@ -330,6 +329,7 @@ main(int argc, char **argv)
|
|||
sigint.sa_flags = SA_RESETHAND;
|
||||
sigaction(SIGINT, &sigint, NULL);
|
||||
|
||||
wl_surface_attach(window->surface, window->buffer, 0, 0);
|
||||
redraw(window, NULL, 0);
|
||||
|
||||
while (running)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue