mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
composite: Only copy bits from the parent pixmap when absolutely necessary
Since1e728c3e88, Whenever we allocate a composite pixmap, we perform an expensive CopyArea call from the parent pixmap. This leads to very bad performance when using a framebuffer driver without shadowfb. My guess is that this call ends up reading memory from the framebuffer memory directly, which is very slow. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1814 Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: stefan11111 <stefan11111@shitposting.expert> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2073> (cherry picked from commit7e6c55cc9f)
This commit is contained in:
committed by
Alan Coopersmith
parent
9d6e68b45f
commit
1708f0f6ae
@@ -544,6 +544,9 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
|
||||
pPixmap->screen_x = x;
|
||||
pPixmap->screen_y = y;
|
||||
|
||||
if (pWin->backgroundState != None)
|
||||
return pPixmap;
|
||||
|
||||
if (pParent->drawable.depth == pWin->drawable.depth) {
|
||||
GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user