[PATCH] Revert "composite: Don't backfill non-MapWindow allocations"

Pierre-Loup A. Griffais pgriffais at nvidia.com
Fri Jul 29 16:59:07 PDT 2011


On 07/29/2011 03:26 PM, Ville Syrjälä wrote:
> On Thu, Jul 28, 2011 at 01:00:54PM -0700, Pierre-Loup A. Griffais wrote:
>> Oops, initially got an outdated address for Ville. Properly CCing now; the idea
>> is that 193ecc8b453b22b3e6 breaks backfilling on resize if db8840600e8e213562 is
>> also applied.
>
> The problem only affects bg=None windows, right?

I haven't observed corruption for other windows, but I haven't looked for it either.

> Might be nice to get 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc back to
> avoid the copy for bg!=None cases. But I suppose no-one has had the
> time/incentive to look at the issue in more detail.

https://bugs.freedesktop.org/34427 seems to imply there was a genuine problem 
with it. The logic looks sane to me too, but reverting it sounds like it fixed 
issues for a lot of people. As you said I haven't personally experienced or 
debugged this particular problem and it would probably need a closer look before 
adding it back.

Thanks,
  - Pierre-Loup

>>
>> Thanks,
>>    - Pierre-Loup
>>
>> On 07/28/2011 12:58 PM, Pierre-Loup A. Griffais wrote:
>>> This reverts commit db8840600e8e21356241eb87395031388d9b54d2.
>>>
>>> Conflicts:
>>>
>>> 	composite/compalloc.c
>>> ---
>>>    composite/compalloc.c |   10 +++-------
>>>    1 files changed, 3 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/composite/compalloc.c b/composite/compalloc.c
>>> index 5c27631..841b2dc 100644
>>> --- a/composite/compalloc.c
>>> +++ b/composite/compalloc.c
>>> @@ -557,7 +557,7 @@ compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin)
>>>    }
>>>
>>>    static PixmapPtr
>>> -compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map)
>>> +compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
>>>    {
>>>        ScreenPtr	    pScreen = pWin->drawable.pScreen;
>>>        WindowPtr	    pParent = pWin->parent;
>>> @@ -572,10 +572,6 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map)
>>>        pPixmap->screen_x = x;
>>>        pPixmap->screen_y = y;
>>>
>>> -    /* resize allocations will update later in compCopyWindow, not here */
>>> -    if (!map)
>>> -	return pPixmap;
>>> -
>>>        if (pParent->drawable.depth == pWin->drawable.depth)
>>>        {
>>>    	GCPtr	pGC = GetScratchGC (pWin->drawable.depth, pScreen);
>>> @@ -641,7 +637,7 @@ compAllocPixmap (WindowPtr pWin)
>>>        int		    y = pWin->drawable.y - bw;
>>>        int		    w = pWin->drawable.width + (bw<<   1);
>>>        int		    h = pWin->drawable.height + (bw<<   1);
>>> -    PixmapPtr	    pPixmap = compNewPixmap (pWin, x, y, w, h, TRUE);
>>> +    PixmapPtr	    pPixmap = compNewPixmap (pWin, x, y, w, h);
>>>        CompWindowPtr   cw = GetCompWindow (pWin);
>>>
>>>        if (!pPixmap)
>>> @@ -713,7 +709,7 @@ compReallocPixmap (WindowPtr pWin, int draw_x, int draw_y,
>>>        pix_h = h + (bw<<   1);
>>>        if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height)
>>>        {
>>> -	pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h, FALSE);
>>> +	pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h);
>>>    	if (!pNew)
>>>    	    return FALSE;
>>>    	cw->pOldPixmap = pOld;
>


More information about the xorg-devel mailing list