On Tue, 11 Dec 2001, Jonathan Walther wrote:

> Thank you Mark.  Your description was just what the doctor ordered.  I
> can get rid of clip masks entirely now, and a bunch of other
> extraneous operations.

   Actually, if the arrow is simple, the fastest way to draw
it would be with a rectangle and a polygon (triangle).  That
would be faster than an arrow shaped stipple.

> 
> Thanks to your description, I don't need to know the following
> information now, but its been bugging the heck out of me:
> how did Keith Packard make his twn menu-windows translucent?
> Are there docs somewhere that should make this obvious to me, which I
> haven't found yet?  On the Render list archives I saw someone saying
> explicitly "this stuff ISN'T documented anywhere..."

   You mean in the pictures from his talk?  I believe that was
a hack to the X-server he did as a proof of concept.  The
Render extension was a skeleton back then.  Though I suppose
you could do it by putting up a window without a background
and then rendering into it with with Render.  When you
unmapped the popup window things would get cleaned up properly. 

                                Mark.

> 
> Jonathan
> 
> On Tue, Dec 11, 2001 at 01:14:24PM -0800, Mark Vojkovich wrote:
> >   Changing the GC clip mask is a very slow operation and using
> >GC clip masks should be avoided in performance paths.
> >
> >  Render everything into a pixmap, set it as the window background
> >and call XClearArea on the window areas you need updated.
> >Note that if you've changed the pixmap contents you need to
> >reset it as the window background because the protocol doesn't
> >guarantee that the new contents will go into effect without that.
> >Note that the pixmap doesn't get damaged when the window does
> >and the window will automatically get repainted from the background
> >pixmap on exposures so you don't need to handle expose events anymore.
> >
> >  If the arrow is monochrome, the fastest way to render it is with
> >a stippled fill using a monochrome bitmap with the shape of the
> >arrow in it.
> >
> >Copy large drawable to 400x400 pixmap (single rectangle)
> >render arrow (single stippled rectangle, note that you'll have
> >   to use XSetTSOrigin to have it match the arrow location since
> >   GC stipples are drawable aligned).
> >set pixmap as window background
> >XClearArea
> >
> >   Do nothing at all for exposures.
> 

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to