mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
composite: Skip copying parent pixmap contents when possible
If the parent window has a different depth (which means pWin can't have valid contents yet) and pWin has effective background other than None. Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2092>
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult
parent
55ee68f13b
commit
2767da13b6
@@ -529,6 +529,15 @@ compUnredirectOneSubwindow(WindowPtr pParent, WindowPtr pWin)
|
||||
return Success;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
compGetBackgroundState(WindowPtr pWin)
|
||||
{
|
||||
while (pWin->backgroundState == ParentRelative)
|
||||
pWin = pWin->parent;
|
||||
|
||||
return pWin->backgroundState;
|
||||
}
|
||||
|
||||
static PixmapPtr
|
||||
compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
|
||||
{
|
||||
@@ -563,7 +572,7 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
|
||||
FreeScratchGC(pGC);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else if (compGetBackgroundState(pWin) == None) {
|
||||
PictFormatPtr pSrcFormat = PictureWindowFormat(pParent);
|
||||
PictFormatPtr pDstFormat = PictureWindowFormat(pWin);
|
||||
XID inferiors = IncludeInferiors;
|
||||
|
||||
Reference in New Issue
Block a user