Re: [PATCH] gl: Fix bug in cairo_surface_create_similar().
Chuanbo Weng <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAFu4+mVhgusEmBd1kOsBwpAiO-6GDYGBMMpWcw+SqHT_8oK6+Q@mail.gmail.com> |
I find the reason now. The surface is explicitly cleared to (0, 0, 0, 1) in cairo_gl_surface_create() using _cairo_gl_surface_clear(), but not cleared in _cairo_gl_surface_create_similar(). However, now it's not neccessary to do clearing in _cairo_gl_surface_create_similar() because of restoration of "particular fast path". It will be more effective. 2011/12/7 Chris Wilson <[email protected]> > On Wed, 7 Dec 2011 20:20:33 +0800, 王明 <[email protected]> wrote: > > 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 > > and > > destination surface is 0, then the result alpha is 0. > > Except that the blend equation for a CONTENT_COLOR destination is to always > set the output alpha to 1.0. > > > But after this commit > > 6b472e12ae11f7b68289cdfd616e765be9a25a98< > http://cgit.freedesktop.org/cairo/commit/?id=6b472e12ae11f7b68289cdfd616e765be9a25a98 > >, > > I reiterate that cairo_surface_create_similar(CONTENT_COLOR) was already > being explicitly cleared to (0, 0, 0, 1) prior to the restoration of > that particular fast path. Whatever bug you are seeing is still present, > just now papered over. > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre > -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo