CompositeGlyph question..

Mohan Parthasarathy suruti94 at gmail.com
Wed Jul 23 09:22:00 PDT 2008


On Wed, Jul 23, 2008 at 12:19 AM, Michel Dänzer <michel at tungstengraphics.com>
wrote:

> On Tue, 2008-07-22 at 11:01 -0700, Mohan Parthasarathy wrote:
> >
> > CompositeGlyph according to the spec,
> >
> >
> >        When mask-format is not None, glyphs are rendered in the
> > following way with the effective mask computed in mask-format:
> >
> > tmp = temporary alpha picture
> > Combine (Zero, tmp, tmp, None)
> > for each glyph
> >      Combine (Add, tmp, glyph, None)
> > Combine (op, dst, source, tmp)
> >
> >
> >  So, i can see that before glyphs are actually rendered, it is
> > combined with a mask.
>
> When a mask format is specified, the glyphs are first accumulated to a
> temporary picture of the specified format, which is then used as a mask


Is this accumulation a composite operation ?

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

Thanks
mohan


>
> --
> 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/20080723/2ab5e5d0/attachment.html>


More information about the xorg mailing list