mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-09 00:20:33 +01:00
Merge branch 'compNewPixmap-different-depth-skip-copy' into 'master'
composite: Skip copying parent pixmap contents when possible See merge request xorg/xserver!2092
This commit is contained in:
commit
6ed51a4303
1 changed files with 10 additions and 4 deletions
|
|
@ -526,6 +526,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)
|
||||
{
|
||||
|
|
@ -542,9 +551,6 @@ 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);
|
||||
|
||||
|
|
@ -563,7 +569,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