Re: [PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes

2014-02-17 Thread Emilio Pozuelo Monfort
On 12/02/14 15:55, Jasper St. Pierre wrote:
> What reschedules the frame being drawn when focused is gained / lost, then?

I'm not sure what reschedules it, but it does happen: twice when the window is
focused, twice when it is unfocused (maybe something to optimize, why are we
redrawing twice?).

Emilio
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes

2014-02-12 Thread Bryce W. Harrington
On Wed, Feb 12, 2014 at 09:08:51AM +0100, Emilio Pozuelo Monfort wrote:
> On 12/02/14 01:04, Bryce W. Harrington wrote:
> > (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.)
> 
> That's precisely what made me find this bug, and should be 100% reproducible 
> on
> master. I'm not sure why a clean rebuild would affect this.

Aha, that explains it then.  So yeah, with the patch that behavior no
longer occurs.

Not sure why I'm not able to repro the behavior after reverting the
patch.  I can try it again tomorrow.

Bryce


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes

2014-02-12 Thread Jasper St. Pierre
What reschedules the frame being drawn when focused is gained / lost, then?


On Wed, Feb 12, 2014 at 3:08 AM, Emilio Pozuelo Monfort
wrote:

> On 12/02/14 01:04, Bryce W. Harrington wrote:
> > (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.)
>
> That's precisely what made me find this bug, and should be 100%
> reproducible on
> master. I'm not sure why a clean rebuild would affect this.
>
> Emilio
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



-- 
  Jasper
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes

2014-02-12 Thread Emilio Pozuelo Monfort
On 12/02/14 01:04, Bryce W. Harrington wrote:
> (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.)

That's precisely what made me find this bug, and should be 100% reproducible on
master. I'm not sure why a clean rebuild would affect this.

Emilio
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes

2014-02-11 Thread Bryce W. Harrington
On Mon, Feb 10, 2014 at 04:52:32PM +0100, Emilio Pozuelo Monfort wrote:
> From: Emilio Pozuelo Monfort 
> 
> 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 
Reviewed-by: Bryce Harrington 


(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 
> ---
>  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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston 1/2] toytoolkit: avoid unnecessary redraws when focus changes

2014-02-10 Thread Emilio Pozuelo Monfort
From: Emilio Pozuelo Monfort 

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.

Signed-off-by: Emilio Pozuelo Monfort 
---
 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel