forked from enlightenment/efl
Evas rg_etc2: Use new ETC2 decoder for RGB8_ETC2
Alpha support is still a TODO.
This commit is contained in:
parent
5582ee016e
commit
4e358a582e
|
@ -72,9 +72,7 @@ static const Evas_Colorspace cspaces_etc1[2] = {
|
||||||
|
|
||||||
static const Evas_Colorspace cspaces_rgb8_etc2[2] = {
|
static const Evas_Colorspace cspaces_rgb8_etc2[2] = {
|
||||||
EVAS_COLORSPACE_RGB8_ETC2,
|
EVAS_COLORSPACE_RGB8_ETC2,
|
||||||
#ifdef HAVE_ETC2_DECODER
|
|
||||||
EVAS_COLORSPACE_ARGB8888
|
EVAS_COLORSPACE_ARGB8888
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const Evas_Colorspace cspaces_rgba8_etc2_eac[2] = {
|
static const Evas_Colorspace cspaces_rgba8_etc2_eac[2] = {
|
||||||
|
@ -327,8 +325,7 @@ evas_image_load_file_data_tgv(void *loader_data,
|
||||||
master.x += 1;
|
master.x += 1;
|
||||||
master.y += 1;
|
master.y += 1;
|
||||||
#ifndef HAVE_ETC2_DECODER
|
#ifndef HAVE_ETC2_DECODER
|
||||||
if (loader->cspace == EVAS_COLORSPACE_RGB8_ETC2 ||
|
if (loader->cspace == EVAS_COLORSPACE_RGBA8_ETC2_EAC)
|
||||||
loader->cspace == EVAS_COLORSPACE_RGBA8_ETC2_EAC)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Requested ETC2 to RGBA conversion but there is no decoder\n");
|
fprintf(stderr, "Requested ETC2 to RGBA conversion but there is no decoder\n");
|
||||||
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
|
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
|
||||||
|
@ -410,6 +407,9 @@ evas_image_load_file_data_tgv(void *loader_data,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EVAS_COLORSPACE_RGB8_ETC2:
|
||||||
|
rg_etc2_rgb8_decode_block((uint8_t *) it, temporary);
|
||||||
|
break;
|
||||||
#ifdef HAVE_ETC2_DECODER
|
#ifdef HAVE_ETC2_DECODER
|
||||||
case EVAS_COLORSPACE_RGB8_ETC2:
|
case EVAS_COLORSPACE_RGB8_ETC2:
|
||||||
etc2_rgb8_decode_block((uint8_t *) it, (uint8_t *) temporary, 16, 4, 4);
|
etc2_rgb8_decode_block((uint8_t *) it, (uint8_t *) temporary, 16, 4, 4);
|
||||||
|
|
Loading…
Reference in New Issue