[mutter/wayland] wayland: Remove width / height from MetaWaylandBuffer



commit 374e30043b894dddcc89e0905a36ff69c5be1642
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Feb 18 22:42:34 2014 -0500

    wayland: Remove width / height from MetaWaylandBuffer
    
    They're in the texture.

 src/wayland/meta-wayland-surface.c |   10 ++++------
 src/wayland/meta-wayland-surface.h |    1 -
 2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 02ae53a..7d92573 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -273,8 +273,6 @@ ensure_buffer_texture (MetaWaylandBuffer *buffer)
     }
 
   buffer->texture = texture;
-  buffer->width = cogl_texture_get_width (texture);
-  buffer->height = cogl_texture_get_height (texture);
 }
 
 static void
@@ -324,11 +322,11 @@ toplevel_surface_commit (MetaWaylandSurface             *surface,
       /* We resize X based surfaces according to X events */
       if (buffer != NULL && window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
         {
-          int new_width;
-          int new_height;
+          int new_width, new_height;
+
+          new_width = cogl_texture_get_width (buffer->texture);
+          new_height = cogl_texture_get_height (buffer->texture);
 
-          new_width = surface->buffer->width;
-          new_height = surface->buffer->height;
           if (new_width != window->rect.width ||
               new_height != window->rect.height ||
               pending->dx != 0 ||
diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h
index 8b10b31..1430569 100644
--- a/src/wayland/meta-wayland-surface.h
+++ b/src/wayland/meta-wayland-surface.h
@@ -38,7 +38,6 @@ struct _MetaWaylandBuffer
   struct wl_listener destroy_listener;
 
   CoglTexture *texture;
-  int32_t width, height;
   uint32_t ref_count;
 };
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]