[PATCH 1/2] simple-shm: Don't attach the buffer to the surface for every redraw
Kristian Høgsberg
hoegsberg at gmail.com
Thu Oct 4 08:36:06 PDT 2012
On Tue, Oct 02, 2012 at 06:03:14PM +0100, Rob Bradford wrote:
> From: Rob Bradford <rob at linux.intel.com>
>
> This will allow us to change just a sub region of the buffer.
Good changes, makes simple-shm a more useful test case. Committed.
Kristian
> ---
> clients/simple-shm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/clients/simple-shm.c b/clients/simple-shm.c
> index 252e040..e8dc620 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)
> --
> 1.7.11.2
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list