On Fri, 10 Mar 2006 19:38:11 -0800 "David Sharp" <[EMAIL PROTECTED]> babbled:
> On 3/10/06, The Rasterman Carsten Haitzler <[EMAIL PROTECTED]> wrote:
> > On Fri, 10 Mar 2006 18:58:33 +0100 (CET) Vincent Torri
> > <[EMAIL PROTECTED]> babbled:
> > > hey,
> > >
> > > in evas_engine.c, I can see (line 151 and after)
> > >
> > >
> > > if (!re->mask)
> > > re->output = _xr_render_surface_adopt(re->xinf, re->win, e->output.w,
> > > e->output.h, re->destination_alpha);
> > > else
> > > re->output = _xr_render_surface_adopt(re->xinf, re->win, e->output.w,
> > > e->output.h, 0);
> > >
> > > if (re->mask)
> > > re->mask_output = _xr_render_surface_format_adopt(re->xinf, re->mask,
> > > e->output.w,
> > > e->output.h,
> > > re->xinf->fmt1, 1);
> > > else
> > > re->mask_output = NULL;
> > >
> > > that is 2 if/else on re->mask. What is the point of doing them ?
> >
> > if re->mask is 0 (no destination mask target is given) BUT
> > re->destination_alpha is 1 then we still want the destination buffer to
> > have an alpha channel - this allows evas to render to argb windows and
> > literally produce alpha channels xcomposite can use with compositing.
> >
>
> I think Vincent's point was that the two if/else clauses could be
> easily combined:
>
> if (!re->mask) {
> re->output = _xr_render_surface_adopt(re->xinf, re->win,
> e->output.w, e->output.h, re->destination_alpha);
> re->mask_output = NULL;
> } else {
> re->output = _xr_render_surface_adopt(re->xinf, re->win,
> e->output.w, e->output.h, 0);
> re->mask_output = _xr_render_surface_format_adopt(re->xinf, re->mask,
> e->output.w,
> e->output.h, re->xinf->fmt1, 1);
> }
>
> might save an op or two as well.
aaah - well check in detail. you CAN have destination_alpha be 0. you can have
it 0 and mask be 1 which means - we want destination alpha BUT we want to
reduce it to a mask later. the logic there handles that pretty compactly.
ie valid combinations and what they do:
mask dalpha | meaning
-------------+-------------------------------------------------------------------
0 0 | render to solid RGB dest
1 0 | render to ARGB dest but reduce the A channel to a mask
0 1 | render to ARGB dest but let a composite manager deal with the
alpha
1 1 | render to ARGB dest but reduce the A channel to a mask
this is how the logic ends up working :)
> d#
>
> > > Vincent
> > >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd_______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel