[cairo] [PATCH] gl: Fix bug in cairo_surface_create_similar().
strgnm at gmail.com
Wed Dec 7 04:20:33 PST 2011
Well, only using glBlendFuncSeperate is not enough to assure alpha value of
destination surface to be 1.0. For example, if both alpha value of source
destination surface is 0, then the result alpha is 0.
But after this commit
CONTENT_COLOR similar surface is explicitly cleared to (0, 0, 0, 1).
2011/12/6 Chris Wilson <chris at chris-wilson.co.uk>
> 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 Wilson, Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo