[cairo] Road to 1.10

Kristian Høgsberg krh at bitplanet.net
Mon Feb 16 07:27:48 PST 2009


On Mon, Feb 16, 2009 at 6:30 AM, Emmanuele Bassi <ebassi at linux.intel.com> wrote:
> On Mon, 2009-02-16 at 10:06 +0000, Chris Wilson wrote:
>
>> On a more wider topic, having played with wayland and creating a
>> cairo-based compositor, we sorely lack the ability to use a
>> non-premultiplied source (such as an OpenGL window, or SDL surface as
>> above). CAIRO_FORMAT_ARGB32_NON_PREMULTIPLIED_SOURCE - hideous, but
>> fairly trivial to handle in a shader. (Slightly more work to add the
>> extra code paths to pixman though!)
>
> one of the hits we get when using Cairo in Clutter comes from the
> unpremultiplication of the alpha channel when uploading an image surface
> into a GL texture. it's a one-off operation, but done for a lot of
> textures, and if the textures are changing their size (e.g. during an
> animation involving width/height properties) then it causes performance
> issues -- on top of the usual performance implications of using an image
> surface.

Is there a reason you can't just set

  glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

Or am I missing something?

cheers,
Kristian


More information about the cairo mailing list