On Sun, Sep 12, 2010 at 06:48:46PM +0100, Ken Moffat wrote:
> On Sun, Sep 12, 2010 at 11:14:43AM -0500, DJ Lucas wrote:
> > 
> > Guys, Thomas Trepl posted a patch to BLFS-Dev on 2010-08-19.  I believe
> > this patch will fix the slow resize issue, however, there are some
> > issues.  It will not go into the book as is, but I would like to see at
> > least a mention and patch file in the wiki to cover this corner case
> > which is specific to ATI cards.  For more info, see this thread:
> > 
> > http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2010-August/020578.html
> > 
> > If either of you would like to make it a server option, and set it to
> > false by default, please do so and it will get introduced to the book.
> > I looked into it for about an hour and gave up.
> > 
> > -- DJ Lucas
> > 
>  Thanks for the link.  I'd overlooked that because I thought it was
> for kde4.  For me, it's only an occasional problem - will maybe take
> a look in a week or so.
> 
 With my essentially-LFS-6.7 desktop I'm noticing that if I have
firefox open on one desktop, and something else in the same area on
another, when I go back to firefox it takes a noticeable time to
repaint itself, even if the processor was idle.  This is with
xorg-server-1.9.  Compare to the 1.7-series servers where I only
notice delays if I'm compiling something.

 So, I looked at the thread that was pointed to.  I got quite
confused by all the references to fglrx, but eventually picked the
xserver-xorg-backclear.patch from Felix Kuehling [attached].  Was
that what you were talking about ?

 I applied it by hand to 1.9 [ also attached ] but it doesn't help.
I'm not totally surprised, the main discussion in the thread pointed
to by Thomas, apart from being for fglrx, seemed to be about a
slowness in resizing windows (and from people using modern radeons).

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
--- xorg-server-1.6.3/composite/compalloc.c     2009-07-07 13:48:57.000000000 
-0400
+++ xorg-server-1.6.3-backclear/composite/compalloc.c   2009-09-09 
11:55:03.000000000 -0400
@@ -483,65 +483,33 @@
     
     pPixmap->screen_x = x;
     pPixmap->screen_y = y;
-    
-    if (pParent->drawable.depth == pWin->drawable.depth)
-    {
-       GCPtr   pGC = GetScratchGC (pWin->drawable.depth, pScreen);
-       
-       /*
-        * Copy bits from the parent into the new pixmap so that it will
-        * have "reasonable" contents in case for background None areas.
-        */
-       if (pGC)
-       {
-           XID val = IncludeInferiors;
-           
-           ValidateGC(&pPixmap->drawable, pGC);
-           dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
-           (*pGC->ops->CopyArea) (&pParent->drawable,
-                                  &pPixmap->drawable,
-                                  pGC,
-                                  x - pParent->drawable.x,
-                                  y - pParent->drawable.y,
-                                  w, h, 0, 0);
-           FreeScratchGC (pGC);
-       }
-    }
-    else
+
     {
-       PictFormatPtr   pSrcFormat = compWindowFormat (pParent);
-       PictFormatPtr   pDstFormat = compWindowFormat (pWin);
+        /*
+         * Initialize new backing pixmap as fully transparent.
+         */
+        PictFormatPtr   pDstFormat = compWindowFormat (pWin);
        XID             inferiors = IncludeInferiors;
        int             error;
 
-       PicturePtr      pSrcPicture = CreatePicture (None,
-                                                    &pParent->drawable,
-                                                    pSrcFormat,
-                                                    CPSubwindowMode,
-                                                    &inferiors,
-                                                    serverClient, &error);
-                                                   
        PicturePtr      pDstPicture = CreatePicture (None,
                                                     &pPixmap->drawable,
                                                     pDstFormat,
                                                     0, 0,
                                                     serverClient, &error);
 
-       if (pSrcPicture && pDstPicture)
+       if (pDstPicture)
        {
-           CompositePicture (PictOpSrc,
-                             pSrcPicture,
+           CompositePicture (PictOpClear,
+                             pDstPicture,
                              NULL,
                              pDstPicture,
-                             x - pParent->drawable.x,
-                             y - pParent->drawable.y,
-                             0, 0, 0, 0, w, h);
+                             0, 0, 0, 0, 0, 0, w, h);
        }
-       if (pSrcPicture)
-           FreePicture (pSrcPicture, 0);
        if (pDstPicture)
            FreePicture (pDstPicture, 0);
     }
+
     return pPixmap;
 }
 
diff -Naur xorg-server-1.9.0/composite/compalloc.c 
xorg-server-1.9.0.patched//composite/compalloc.c
--- xorg-server-1.9.0/composite/compalloc.c     2010-06-06 18:53:51.000000000 
+0100
+++ xorg-server-1.9.0.patched//composite/compalloc.c    2010-09-23 
23:39:45.992486579 +0100
@@ -488,62 +488,25 @@
     pPixmap->screen_x = x;
     pPixmap->screen_y = y;
     
-    if (pParent->drawable.depth == pWin->drawable.depth)
     {
-       GCPtr   pGC = GetScratchGC (pWin->drawable.depth, pScreen);
-       
-       /*
-        * Copy bits from the parent into the new pixmap so that it will
-        * have "reasonable" contents in case for background None areas.
-        */
-       if (pGC)
-       {
-           ChangeGCVal val;
-           val.val = IncludeInferiors;
-           
-           ValidateGC(&pPixmap->drawable, pGC);
-           ChangeGC (serverClient, pGC, GCSubwindowMode, &val);
-           (*pGC->ops->CopyArea) (&pParent->drawable,
-                                  &pPixmap->drawable,
-                                  pGC,
-                                  x - pParent->drawable.x,
-                                  y - pParent->drawable.y,
-                                  w, h, 0, 0);
-           FreeScratchGC (pGC);
-       }
-    }
-    else
-    {
-       PictFormatPtr   pSrcFormat = compWindowFormat (pParent);
-       PictFormatPtr   pDstFormat = compWindowFormat (pWin);
+       PictFormatPtr   pDstFormat = compWindowFormat (pWin);
        XID             inferiors = IncludeInferiors;
        int             error;
-
-       PicturePtr      pSrcPicture = CreatePicture (None,
-                                                    &pParent->drawable,
-                                                    pSrcFormat,
-                                                    CPSubwindowMode,
-                                                    &inferiors,
-                                                    serverClient, &error);
-                                                   
+ 
        PicturePtr      pDstPicture = CreatePicture (None,
                                                     &pPixmap->drawable,
                                                     pDstFormat,
                                                     0, 0,
                                                     serverClient, &error);
 
-       if (pSrcPicture && pDstPicture)
+       if (pDstPicture)
        {
-           CompositePicture (PictOpSrc,
-                             pSrcPicture,
+           CompositePicture (PictOpClear,
+                             pDstPicture,
                              NULL,
                              pDstPicture,
-                             x - pParent->drawable.x,
-                             y - pParent->drawable.y,
-                             0, 0, 0, 0, w, h);
+                             0, 0, 0, 0, 0, 0, w, h);
        }
-       if (pSrcPicture)
-           FreePicture (pSrcPicture, 0);
        if (pDstPicture)
            FreePicture (pDstPicture, 0);
     }
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to