mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-13 18:54:31 +00:00
xwayland: Try manual redirection for surface window in glamor_check_flip
If the surface window already uses automatic redirection, we can upgrade to manual redirection and save some blits with common use cases. This fixes a minor performance regression froma65bb8480a('Revert "xwayland/glamor: Avoid implicit redirection with depth 32 parent windows"') with mutter >= 44. Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570> (cherry picked from commit8e8bc0a1ef)
This commit is contained in:
committed by
Alan Coopersmith
parent
e14ed54480
commit
5f4be0da51
@@ -93,6 +93,8 @@ xwl_glamor_check_flip(WindowPtr present_window, PixmapPtr pixmap)
|
||||
{
|
||||
ScreenPtr screen = pixmap->drawable.pScreen;
|
||||
PixmapPtr backing_pixmap = screen->GetWindowPixmap(present_window);
|
||||
struct xwl_window *xwl_window = xwl_window_from_window(present_window);
|
||||
WindowPtr surface_window = xwl_window->surface_window;
|
||||
|
||||
if (pixmap->drawable.depth != backing_pixmap->drawable.depth) {
|
||||
if (pixmap->drawable.depth == 32)
|
||||
@@ -101,6 +103,10 @@ xwl_glamor_check_flip(WindowPtr present_window, PixmapPtr pixmap)
|
||||
return xwl_present_maybe_redirect_window(present_window);
|
||||
}
|
||||
|
||||
if (surface_window->redirectDraw == RedirectDrawAutomatic &&
|
||||
surface_window->drawable.depth != 32)
|
||||
xwl_present_maybe_redirect_window(surface_window);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user