mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 17:30:02 +01:00
composite: Only copy bits from the parent pixmap when absolutely necessary
Since 1e728c3e88 ,
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>
This commit is contained in:
parent
6f31791945
commit
7e6c55cc9f
1 changed files with 3 additions and 0 deletions
|
|
@ -542,6 +542,9 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
|
||||||
pPixmap->screen_x = x;
|
pPixmap->screen_x = x;
|
||||||
pPixmap->screen_y = y;
|
pPixmap->screen_y = y;
|
||||||
|
|
||||||
|
if (pWin->backgroundState != None)
|
||||||
|
return pPixmap;
|
||||||
|
|
||||||
if (pParent->drawable.depth == pWin->drawable.depth) {
|
if (pParent->drawable.depth == pWin->drawable.depth) {
|
||||||
GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen);
|
GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue