diff options
author | Robert Mader <robert.mader@posteo.de> | 2019-12-04 18:54:42 +0100 |
---|---|---|
committer | Robert Mader <robert.mader@posteo.de> | 2019-12-04 18:59:24 +0100 |
commit | 96e188336112e5cf633d110aeb513e47cb6f7303 (patch) | |
tree | bbd655b32379e78677945980f46fa288446a3083 | |
parent | 0d1c18a4ce0f20beac9da0bcb009a620eb65c485 (diff) | |
download | mutter-96e188336112e5cf633d110aeb513e47cb6f7303.tar.gz |
xwayland: Do not queue frame callbacks unconditionally
The removed comment is not longer true: XWayland schedules its VSYNC
from frame callbacks nowadays. Only sending callbacks when the surface
actor is unobscured makes XWayland throttle its VSYNC to 1/sec,
reducing repaints in many cases.
Follow up of https://gitlab.gnome.org/GNOME/mutter/merge_requests/918
https://gitlab.gnome.org/GNOME/mutter/merge_requests/956
-rw-r--r-- | src/wayland/meta-xwayland.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index 4f68bc6d7..06a1ea368 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -872,31 +872,6 @@ xwayland_surface_assigned (MetaWaylandSurfaceRole *surface_role) surface_role_class->assigned (surface_role); } -static void -xwayland_surface_commit (MetaWaylandSurfaceRole *surface_role, - MetaWaylandPendingState *pending) -{ - MetaWaylandSurface *surface = - meta_wayland_surface_role_get_surface (surface_role); - MetaWaylandSurfaceRoleClass *surface_role_class = - META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_surface_role_xwayland_parent_class); - - /* For Xwayland windows, throttling frames when the window isn't actually - * drawn is less useful, because Xwayland still has to do the drawing sent - * from the application - the throttling would only be of sending us damage - * messages, so we simplify and send frame callbacks after the next paint of - * the screen, whether the window was drawn or not. - * - * Currently it may take a few frames before we draw the window, for not - * completely understood reasons, and in that case, not thottling frame - * callbacks to drawing has the happy side effect that we avoid showing the - * user the initial black frame from when the window is mapped empty. - */ - meta_wayland_surface_queue_pending_state_frame_callbacks (surface, pending); - - surface_role_class->commit (surface_role, pending); -} - static MetaWaylandSurface * xwayland_surface_get_toplevel (MetaWaylandSurfaceRole *surface_role) { @@ -961,7 +936,6 @@ meta_wayland_surface_role_xwayland_class_init (MetaWaylandSurfaceRoleXWaylandCla object_class->finalize = xwayland_surface_finalize; surface_role_class->assigned = xwayland_surface_assigned; - surface_role_class->commit = xwayland_surface_commit; surface_role_class->get_toplevel = xwayland_surface_get_toplevel; actor_surface_class->get_geometry_scale = xwayland_surface_get_geometry_scale; |