[mutter] wayland-surface: Apply the surface scale only if needed



commit 0364ea91403cfc1c675c2776dda50aff4fb3788b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Oct 6 19:52:31 2014 -0700

    wayland-surface: Apply the surface scale only if needed
    
    There's no need to call scale_texture on every commit.

 src/wayland/meta-wayland-surface.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index c59f5b0..995ca5d 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -431,7 +431,10 @@ commit_pending_state (MetaWaylandSurface      *surface,
     }
 
   if (pending->scale > 0)
-    surface->scale = pending->scale;
+    {
+      surface->scale = pending->scale;
+      meta_surface_actor_wayland_scale_texture (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
+    }
 
   if (!cairo_region_is_empty (pending->damage))
     surface_process_damage (surface, pending->damage);
@@ -461,9 +464,6 @@ commit_pending_state (MetaWaylandSurface      *surface,
 
   g_list_foreach (surface->subsurfaces, parent_surface_committed, NULL);
 
-  /* scale surface texture */
-  meta_surface_actor_wayland_scale_texture (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
-
   /* wl_surface.frame */
   wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);
   wl_list_init (&pending->frame_callback_list);


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