[Pixman] Pixman glyph compositing
David Herrmann
dh.herrmann at googlemail.com
Thu Jan 24 03:57:58 PST 2013
Hi Chris
On Wed, Jan 23, 2013 at 11:00 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Wed, Jan 23, 2013 at 08:50:18PM +0100, David Herrmann wrote:
>> Hi
>>
>> While working on kmscon the main rendering task I am faced with is
>> blending a glyph into the main framebuffer with a constant foreground
>> and background color. The code I have been using is a per-pixel
>> blending operation on each color value:
>
> What you want is to use pixman_composite_glyphs_no_mask() with a
> LERP_SRC operator. Whilst we have the fast glyph routines, the linear
> interpolation operator is still incomplete. You can take a look at an
> old patch here:
> http://cgit.freedesktop.org/~ickle/pixman/commit/?h=lerp&id=1ace0cf5a1983c7fc96a343379acffbc36efb61e
But that would still require a pixman_fill() before doing the
composite, right? And hence, I would also need the shadow buffer. So I
don't think I win much by this. Using
UN8x4_MUL_UN8_ADD_UN8x4_MUL_UN8() and doing the loop by hand seems to
be slightly faster, even though its not optimized to any architecture.
Also I don't insist on the linear interpolation. It just needs to look
nice so the OVER operator I used so far was fine.
On the other hand, LERP_SRC would be nice to have.
Thanks!
David
More information about the Pixman
mailing list