From 0364ea91403cfc1c675c2776dda50aff4fb3788b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 6 Oct 2014 19:52:31 -0700 Subject: [PATCH] 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 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index c59f5b095..995ca5dfb 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);