[PATCH weston 1/3] zoom: Don't update the zoom translation if zoom level is 0
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Wed Nov 21 05:11:36 PST 2012
On the first frame with zoom activated, the spring used for animation
will have a current value of zero. The translation calculated with that
value will be invalid (not a number). Using this value later leads to
having an invalid output matrix, so nothing is composited in the first
zoomed frame.
This problem is most evident when a sprite plane is being used. In that
case, enabling the zoom will cause the surface to be moved back to the
primary plane, but because of the bug described above, this surface
would not actually be rendered causing a quick flicker.
---
src/zoom.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/zoom.c b/src/zoom.c
index 3be27f6..d57b868 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -251,7 +251,8 @@ weston_output_update_zoom_transform(struct weston_output *output)
level = output->zoom.spring_z.current;
ratio = 1 / level;
- if (!output->zoom.active || level > output->zoom.max_level)
+ if (!output->zoom.active || level > output->zoom.max_level ||
+ level == 0.0f)
return;
if (type == ZOOM_FOCUS_POINTER &&
--
1.7.10.4
More information about the wayland-devel
mailing list