forked from enlightenment/efl
evas - png loader - work around libpng arm bug where rgb > a on decode
on arm when a is 0 ... per pixel rgb can be > 0 which violates premul rgb leading to junk rendering. this now is worked around in the png loader and forces rgb to 0 when a is 0 per pixel. @fix
This commit is contained in:
parent
9490cf857b
commit
7743b17dba
|
@ -596,6 +596,17 @@ evas_image_load_file_head_with_data_png(void *loader_data,
|
||||||
}
|
}
|
||||||
free(pixels2);
|
free(pixels2);
|
||||||
|
|
||||||
|
if ((epi.hasa) && (pack_offset == sizeof(DATA32)))
|
||||||
|
{
|
||||||
|
DATA32 *dst_ptr = (DATA32 *) surface;
|
||||||
|
int total = w * h;
|
||||||
|
|
||||||
|
for (i = 0; i < total; i++)
|
||||||
|
{
|
||||||
|
if (A_VAL(dst_ptr) == 0) *dst_ptr = 0;
|
||||||
|
dst_ptr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
prop->info.premul = EINA_TRUE;
|
prop->info.premul = EINA_TRUE;
|
||||||
|
|
||||||
*error = EVAS_LOAD_ERROR_NONE;
|
*error = EVAS_LOAD_ERROR_NONE;
|
||||||
|
@ -882,6 +893,17 @@ evas_image_load_file_data_png(void *loader_data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((epi.hasa) && (pack_offset == sizeof(DATA32)))
|
||||||
|
{
|
||||||
|
DATA32 *dst_ptr = (DATA32 *) surface;
|
||||||
|
int total = w * h;
|
||||||
|
|
||||||
|
for (i = 0; i < total; i++)
|
||||||
|
{
|
||||||
|
if (A_VAL(dst_ptr) == 0) *dst_ptr = 0;
|
||||||
|
dst_ptr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
prop->info.premul = EINA_TRUE;
|
prop->info.premul = EINA_TRUE;
|
||||||
|
|
||||||
*error = EVAS_LOAD_ERROR_NONE;
|
*error = EVAS_LOAD_ERROR_NONE;
|
||||||
|
|
Loading…
Reference in New Issue