Mesa (master): st/egl/wayland: Take resize parameters only if size changes

Benjamin Franzke bnf at kemper.freedesktop.org
Thu Jun 23 10:38:40 UTC 2011


Module: Mesa
Branch: master
Commit: 87c3bb65bbd4fdf868d57c2c58f3330efa36b75b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87c3bb65bbd4fdf868d57c2c58f3330efa36b75b

Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date:   Thu Jun 23 12:12:52 2011 +0200

st/egl/wayland: Take resize parameters only if size changes

This matches what we do in egl_dri2, and clients should
behave like this anyway.

---

 .../state_trackers/egl/wayland/native_wayland.c    |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.c b/src/gallium/state_trackers/egl/wayland/native_wayland.c
index 3d1bb6f..f183538 100644
--- a/src/gallium/state_trackers/egl/wayland/native_wayland.c
+++ b/src/gallium/state_trackers/egl/wayland/native_wayland.c
@@ -195,13 +195,11 @@ wayland_window_surface_handle_resize(struct wayland_surface *surface)
             wl_buffer_destroy(surface->buffer[i]);
          surface->buffer[i] = NULL;
       }
+
+      surface->dx = surface->win->dx;
+      surface->dy = surface->win->dy;
    }
    pipe_resource_reference(&front_resource, NULL);
-
-   surface->dx = surface->win->dx;
-   surface->dy = surface->win->dy;
-   surface->win->dx = 0;
-   surface->win->dy = 0;
 }
 
 static boolean




More information about the mesa-commit mailing list