diff options
author | Rob Bradford <rob@linux.intel.com> | 2012-10-02 18:03:14 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-04 11:34:05 -0400 |
commit | fecf332e19f731c26fc9d7c6d5cad540a2da554f (patch) | |
tree | ed20ed4a1abd0f5c6d8b0e4f0feec0b307525a1b | |
parent | 70f83679ee24bd01e7a0f481e23a7da0c10c9cfe (diff) |
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.
-rw-r--r-- | clients/simple-shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/simple-shm.c b/clients/simple-shm.c index 252e0403..e8dc620b 100644 --- a/clients/simple-shm.c +++ b/clients/simple-shm.c @@ -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) |