CompositeGlyph question..

Michel Dänzer michel at tungstengraphics.com
Wed Jul 23 00:19:52 PDT 2008


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

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


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer




More information about the xorg mailing list