mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 11:30:30 +01: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:
parent
e14ed54480
commit
5f4be0da51
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue