(Menu) Use separate iteration stepping for image processing
This commit is contained in:
parent
608df4f6de
commit
645c8bb0cc
|
@ -410,6 +410,7 @@ typedef struct nbio_image_handle
|
||||||
bool is_finished_with_processing;
|
bool is_finished_with_processing;
|
||||||
transfer_cb_t cb;
|
transfer_cb_t cb;
|
||||||
struct rpng_t *handle;
|
struct rpng_t *handle;
|
||||||
|
unsigned processing_pos_increment;
|
||||||
unsigned pos_increment;
|
unsigned pos_increment;
|
||||||
uint64_t frame_count;
|
uint64_t frame_count;
|
||||||
uint64_t processing_frame_count;
|
uint64_t processing_frame_count;
|
||||||
|
|
|
@ -247,7 +247,8 @@ static int cb_nbio_image_menu_wallpaper(void *data, size_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
nbio->image.handle->buff_data = (uint8_t*)ptr;
|
nbio->image.handle->buff_data = (uint8_t*)ptr;
|
||||||
nbio->image.pos_increment = (len / 2) ? (len / 2) : 1;
|
nbio->image.pos_increment = (len / 2) ? (len / 2) : 1;
|
||||||
|
nbio->image.processing_pos_increment = (len / 4) ? (len / 4) : 1;
|
||||||
|
|
||||||
if (!rpng_nbio_load_image_argb_start(nbio->image.handle))
|
if (!rpng_nbio_load_image_argb_start(nbio->image.handle))
|
||||||
{
|
{
|
||||||
|
@ -328,7 +329,7 @@ static int rarch_main_iterate_image_processing_transfer(nbio_handle_t *nbio)
|
||||||
if (!nbio)
|
if (!nbio)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (i = 0; i < nbio->image.pos_increment; i++)
|
for (i = 0; i < nbio->image.processing_pos_increment; i++)
|
||||||
{
|
{
|
||||||
retval = rpng_nbio_load_image_argb_process(nbio->image.handle,
|
retval = rpng_nbio_load_image_argb_process(nbio->image.handle,
|
||||||
&nbio->image.ti.pixels, &nbio->image.ti.width, &nbio->image.ti.height);
|
&nbio->image.ti.pixels, &nbio->image.ti.width, &nbio->image.ti.height);
|
||||||
|
@ -337,11 +338,10 @@ static int rarch_main_iterate_image_processing_transfer(nbio_handle_t *nbio)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nbio->image.processing_frame_count++;
|
||||||
|
|
||||||
if (retval == IMAGE_PROCESS_NEXT)
|
if (retval == IMAGE_PROCESS_NEXT)
|
||||||
{
|
|
||||||
nbio->image.processing_frame_count++;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
nbio->image.processing_final_state = retval;
|
nbio->image.processing_final_state = retval;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue