wayland-surface: Apply the surface scale only if needed

There's no need to call scale_texture on every commit.
This commit is contained in:
Jasper St. Pierre 2014-10-06 19:52:31 -07:00
parent c0bdb3018b
commit 0364ea9140

View File

@ -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);