mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 06:50:40 +01: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:
parent
d4be568863
commit
39897b3b71
1 changed files with 10 additions and 1 deletions
|
|
@ -528,6 +528,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)
|
||||
{
|
||||
|
|
@ -562,7 +571,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue