CompositeGlyph question..
Mohan Parthasarathy
suruti94 at gmail.com
Thu Jul 24 13:01:53 PDT 2008
>
>
> > for a single composite operation to the destination picture in
> > order to
> > actually render the glyphs. Without a mask format, each glyph
> > is used as
> > a mask for a composite operation to the destination picture
> > directly.
> >
> > The result should be visually identical unless the mask format
> > is
> > different from any of the glyphs or the glyphs overlap.
> >
> > Thanks for the explanation. Do we know how this is done in practice ?
> > I am trying to understand the sequence of operations
> >
> > 1) The client adds glyphs to the server
> > 2) The client calls CompositeGlyph with a non-null format
> > 3) The client calls CompositeGlyph with a null-format and a
> > destination picture
> >
> > Is (2) and (3) done separately or just (3) is done ?
>
> I'm not sure I understand. (2) needs a destination as well, so (2) and
> (3) should be essentially identical, with the caveats I mentioned above.
>
Ah!, when non-null maskFormat is passed, the first composite operation the
Mask
is the destination. But then the second composite operation needs a
destination
also. I am understanding slightly better after reading your mail again and
the code
again :-)
What i am trying to understand is what exactly happens
when i need to display characters on my xterm ? I can see that glyphs are
added to the Xserver. Later a Composite operation is called by the client.
As the maskFormat argument can be null, i am wondering what cases it
is null and what cases it is not null. Initially, i thought you always need
to
composite Glyph with Mask and then composite to the destination which
means maskFormat will always be non-null. Obviously, this is not the case.
So, to render characters on my xterm, i can just send src, dst and glyph
with a
null mask. Is this sufficient ? What cases would require me to pass a
non-null
mask ? What am i missing ?
thanks
mohan
>
>
> > > I searched around in Xft and server side to see where this
> > code is
> > > implemented. I can see that in libXrender, maskFormat
> > getting set to
> > > None or the id. So, it has to be on the server side Perhaps,
> > i am
> > > missing something very obvious.. Can someone point me to
> > this code ?
> >
> >
> > miGlyphs() in render/glyph.c or exaGlyphs() in
> > exa/exa_glyphs.c .
> >
> > I sort of figured that out working backwards from exaCompositeRects ->
> > exaGlyphstoMask...
> > But could not find out when the mask is set to null or not-null.
>
> I think it's simply NULL if the client passes None as maskFormat
> parameter to XRenderCompositeString/Text*() and non-NULL otherwise.
>
>
> --
> Earthling Michel Dänzer | http://tungstengraphics.com
> Libre software enthusiast | Debian, X and DRI developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20080724/3da2a629/attachment.html>
More information about the xorg
mailing list