On Fri, Jun 29, 2012 at 04:00:14PM +0200, Pierre Ossman wrote:
> On Fri, 29 Jun 2012 09:17:39 -0400
> Brian Hinz <bph...@users.sourceforge.net> wrote:
> 
> > r4220 appears to be the cause of bug #3415308.  When I revert the change
> > made in r4220 fluxbox and other apps that exhibit rendering artifacts along
> > their window decorations all behave properly.  I have not seen any problems
> > with this so far (limited testing), however Adam's commit note states
> > that "Don't
> > hook pixmaps in vncHooks, it fixes crash after XDrawArc call.". Attached is
> > the patch I'm using, can someone look over it and verify whether or not
> > there is still a problem with XDrawArc?
> > 
> 
> Hooking pixmaps is fundamentally wrong as they are not part of what's
> displayed, and will therefore never be directly transferred to the
> client.
> 
> The fact that your patch fixes something is an indication that we are
> overlooking some screen updates somewhere else. Unfortunately it's not
> really trivial to figure out what and where. You have to find a simple
> test case, and then start following the chain of draw commands and see
> where a hook is either missing, or miscalculating the damaged region.

You are right that hooking pixmaps is wrong but if r4220 caused this issue,
it should be treated as regression and reverted.

I dived into vncHooks and xserver sources and attached patch should fix both
screen artefacts and XDrawArc crashes. It reverts r4220 and fixes
vncHooksFillSpans hook which used wrong clip pointer.

Can you please test if it works in your case?

Regards, Adam

-- 
Adam Tkac, Red Hat, Inc.
diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/vncHooks.cc.rh734424 
tigervnc-1.1.0/unix/xserver/hw/vnc/vncHooks.cc
--- tigervnc-1.1.0/unix/xserver/hw/vnc/vncHooks.cc.rh734424     2012-07-12 
17:40:32.491230021 +0200
+++ tigervnc-1.1.0/unix/xserver/hw/vnc/vncHooks.cc      2012-07-12 
17:58:51.530006884 +0200
@@ -661,7 +661,9 @@ static void vncHooksValidateGC(GCPtr pGC
   (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
 
   u.vncHooksGC->wrappedOps = 0;
-  if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr) pDrawable)->viewable) 
{
+  //if (pDrawable->type == DRAWABLE_WINDOW)
+  if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP)
+  {
     u.vncHooksGC->wrappedOps = pGC->ops;
     DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
   }    
@@ -741,7 +743,7 @@ static void vncHooksFillSpans(DrawablePt
 {
   GC_OP_UNWRAPPER(pDrawable, pGC, FillSpans);
 
-  RegionHelper changed(pScreen, &((WindowPtr)pDrawable)->borderClip);
+  RegionHelper changed(pScreen, pGC->pCompositeClip);
 
   (*pGC->ops->FillSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);
 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to