[cairo] [PATCH] gl: Fix bug in cairo_surface_create_similar().

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 6 03:33:31 PST 2011


On Tue,  6 Dec 2011 15:36:06 +0800, Chuanbo Weng <strgnm at gmail.com> wrote:
> When use cairo_surface_create_similar() to create a CAIRO_CONTENT_COLOR
> surface within gl backend, the result surface is transparent, fail.
> Since we use use GL_RGBA when create CAIRO_CONTENT_COLOR surface, we
> should make sure the final alpha value is 1.0. So we set alpha value
> of solid source operand to be 1.0, then the final surface is black,
> fixed.

Peculiar. The output alpha value from the blender is hardcoded to 1 for
a CAIRO_CONTENT_COLOR destination surface using glBlendFuncSeperate. Not
only that but the CONTENT_COLOR similar surface is explicitly cleared to
(0, 0, 0, 1) during creation.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list