[PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes
Bryce W. Harrington
b.harrington at samsung.com
Tue Feb 11 16:04:21 PST 2014
On Mon, Feb 10, 2014 at 04:52:32PM +0100, Emilio Pozuelo Monfort wrote:
> From: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
>
> Clients that need to be redrawn when the focus changes do that by
> listening to focus_changed and scheduling a redraw.
>
> This was causing unnecessary redraws in the clients, as could be
> easily seen by changing focus on weston-flower.
I verified with both patches applied there are no new warnings in the
build, and all 12 tests continue passing properly.
Running both with and without the patches on my system I didn't notice a
performance difference just to the naked eye, but presumably if it were
instrumented properly it'd be measurable? In any case, I didn't spot
any regressions.
So, for both patches in the set:
Tested-by: Bryce Harrington <b.harrington at samsung.com>
Reviewed-by: Bryce Harrington <b.harrington at samsung.com>
(For full disclosure - On one test run against master, I noticed the
flower changed shape every time it received or lost focus, however I was
never able to reproduce that behavior even after doing clean rebuilds.)
> Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
> ---
> clients/window.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/clients/window.c b/clients/window.c
> index 91c1ea0..b5f0137 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -3863,7 +3863,6 @@ handle_surface_focused_set(void *data, struct xdg_surface *xdg_surface)
> {
> struct window *window = data;
> window->focused = 1;
> - window_schedule_redraw(window);
> }
>
> static void
> @@ -3871,7 +3870,6 @@ handle_surface_focused_unset(void *data, struct xdg_surface *xdg_surface)
> {
> struct window *window = data;
> window->focused = 0;
> - window_schedule_redraw(window);
> }
>
> static void
> --
> 1.9.rc1
>
> _______________________________________________
> 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