forked from enlightenment/enlightenment
work on better shape handling for gl comp
SVN revision: 46231
This commit is contained in:
parent
0826eb6af5
commit
db323e87f9
|
@ -297,6 +297,8 @@ _e_mod_comp_win_shape_rectangles_apply(E_Comp_Win *cw)
|
|||
if ((w > 0) && (h > 0))
|
||||
{
|
||||
pix = evas_object_image_data_get(cw->obj, 1);
|
||||
if (pix)
|
||||
{
|
||||
spix = calloc(w * h, sizeof(unsigned char));
|
||||
if (spix)
|
||||
{
|
||||
|
@ -313,7 +315,7 @@ _e_mod_comp_win_shape_rectangles_apply(E_Comp_Win *cw)
|
|||
{
|
||||
for (px = 0; px < rw; px++)
|
||||
{
|
||||
*sp = 1; sp++;
|
||||
*sp = 0xff; sp++;
|
||||
}
|
||||
sp += w - rw;
|
||||
}
|
||||
|
@ -324,8 +326,15 @@ _e_mod_comp_win_shape_rectangles_apply(E_Comp_Win *cw)
|
|||
{
|
||||
for (px = 0; px < w; px++)
|
||||
{
|
||||
if (*sp) *p |= 0xff000000;
|
||||
else *p = 0x00000000;
|
||||
unsigned int mask, imask;
|
||||
|
||||
mask = ((unsigned int)(*sp)) << 24;
|
||||
imask = mask >> 8;
|
||||
imask |= imask >> 8;
|
||||
imask |= imask >> 8;
|
||||
*p = mask | (*p & imask);
|
||||
// if (*sp) *p = 0xff000000 | *p;
|
||||
// else *p = 0x00000000;
|
||||
sp++;
|
||||
p++;
|
||||
}
|
||||
|
@ -336,6 +345,7 @@ _e_mod_comp_win_shape_rectangles_apply(E_Comp_Win *cw)
|
|||
evas_object_image_alpha_set(cw->obj, 1);
|
||||
evas_object_image_data_update_add(cw->obj, 0, 0, w, h);
|
||||
}
|
||||
}
|
||||
free(rects);
|
||||
}
|
||||
else
|
||||
|
@ -451,6 +461,8 @@ _e_mod_comp_win_update(E_Comp_Win *cw)
|
|||
}
|
||||
else
|
||||
{
|
||||
evas_object_image_native_surface_set(cw->obj, NULL);
|
||||
cw->native = 0;
|
||||
if (!cw->xim)
|
||||
{
|
||||
if (cw->xim = ecore_x_image_new(cw->pw, cw->ph, cw->vis, cw->depth))
|
||||
|
|
Loading…
Reference in New Issue