evas: reuse code for colorspace logic by using switch case statement fallthrough.

This commit is contained in:
Cedric BAIL 2017-06-05 12:02:59 -07:00
parent 1e0c2e1a02
commit fd38c09735
1 changed files with 2 additions and 0 deletions

View File

@ -1863,8 +1863,10 @@ eng_image_data_slice_add(void *engdata, void *image,
{
case EFL_GFX_COLORSPACE_ARGB8888:
bpp = 4;
EINA_FALLTHROUGH;
case EFL_GFX_COLORSPACE_AGRY88:
if (!bpp) bpp = 2;
EINA_FALLTHROUGH;
case EFL_GFX_COLORSPACE_GRY8:
if (!bpp) bpp = 1;
if (plane != 0) goto fail;