Remove argb_convert for wayland buffers

Wayland buffers are currently either ARGB or XRGB - we don't need to
convert either of these, we just need to set alpha appropriately - which
we now do.
This commit is contained in:
Derek Foreman 2016-02-18 11:06:40 -06:00 committed by Mike Blumenkrantz
parent b4bcb1dc23
commit df7bc5963d
1 changed files with 1 additions and 30 deletions

View File

@ -901,36 +901,7 @@ e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Recta
break;
case E_PIXMAP_TYPE_WL:
if (cp->image_argb) return EINA_TRUE;
#ifdef HAVE_WAYLAND
if (cp->buffer)
{
struct wl_shm_buffer *shm_buffer;
uint32_t format;
int i, x, y;
unsigned int *src, *dst;
shm_buffer = cp->buffer->shm_buffer;
if (!shm_buffer) return EINA_FALSE;
format = wl_shm_buffer_get_format(shm_buffer);
if (format == WL_SHM_FORMAT_XRGB8888)
{
dst = (unsigned int *)pix;
src = (unsigned int *)ipix;
for (y = 0; y < r->h; y++)
{
i = (r->y + y) * stride / 4 + r->x;
for (x = 0; x < r->w; x++)
dst[i+x] = 0xff000000 | src[i+x];
}
pix = (void *)dst;
}
return EINA_TRUE;
}
#endif
break;
return EINA_FALSE;
default:
break;
}