On Thu, Jul 12, 2012 at 12:04 PM, Adam Tkac wrote:

> On Fri, Jun 29, 2012 at 04:00:14PM +0200, Pierre Ossman wrote:
> > On Fri, 29 Jun 2012 09:17:39 -0400
> > Brian Hinz 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.


I think that I see what the fundamental problem is.  miPaintWindow in
mi/miexpose.c draws the border to the pixmap (because "what" == PW_BORDER)
and then calls ValidateGC.  Because it's a pixmap, we don't hook and
therefore desktop->add_changed is not called.  I think that all of the
drawing is correct, it's just not notifying the server that those areas are
damaged.  I checked all of the clip regions and as far as I can tell they
are all correct (that is, the composite clip seems to include the border
areas).  It's ugly, but one workaround might be to go ahead and hook
pixmaps but put an if statement into each hook function to basically bypass
the hooks unless (as in the case of PolyFillRect) there was some reason not
to.

-brian
------------------------------------------------------------------------------
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