diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 58c742958f..6f9a7a7dc5 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1416,20 +1416,16 @@ static void gl2_renderchain_copy_frame( #if defined(HAVE_EGL) if (chain->egl_images) { - gfx_ctx_image_t img_info; bool new_egl = false; EGLImageKHR img = 0; - img_info.frame = frame; - img_info.width = width; - img_info.height = height; - img_info.pitch = pitch; - img_info.index = gl->tex_index; - img_info.rgb32 = (gl->base_size == 4); - img_info.handle = &img; - - new_egl = - video_context_driver_write_to_image_buffer(&img_info); + if (gl->ctx_driver->image_buffer_write) + new_egl = gl->ctx_driver->image_buffer_write( + gl->ctx_data, + frame, width, height, pitch, + (gl->base_size == 4), + gl->tex_index, + &img); if (img == EGL_NO_IMAGE_KHR) { diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 6a784eb095..8e9ac13f42 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -373,19 +373,16 @@ static void vg_copy_frame(void *data, const void *frame, if (vg->mEglImageBuf) { - gfx_ctx_image_t img_info; EGLImageKHR img = 0; bool new_egl = false; - img_info.frame = frame; - img_info.width = width; - img_info.height = height; - img_info.pitch = pitch; - img_info.rgb32 = (vg->mTexType == VG_sXRGB_8888); - img_info.index = 0; - img_info.handle = &img; - - new_egl = video_context_driver_write_to_image_buffer(&img_info); + if (vg->ctx_driver->image_buffer_write) + new_egl = vg->ctx_driver->image_buffer_write( + vg->ctx_data, + frame, width, height, pitch, + (vg->mTexType == VG_sXRGB_8888), + 0, + &img); retro_assert(img != EGL_NO_IMAGE_KHR); diff --git a/retroarch.c b/retroarch.c index b78f553651..cfadf233e7 100644 --- a/retroarch.c +++ b/retroarch.c @@ -33325,17 +33325,6 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data, return NULL; } -bool video_context_driver_write_to_image_buffer(gfx_ctx_image_t *img) -{ - struct rarch_state *p_rarch = &rarch_st; - return ( - p_rarch->current_video_context.image_buffer_write - && p_rarch->current_video_context.image_buffer_write( - p_rarch->video_context_data, - img->frame, img->width, img->height, img->pitch, - img->rgb32, img->index, img->handle)); -} - bool video_context_driver_get_video_output_prev(void) { struct rarch_state *p_rarch = &rarch_st; diff --git a/retroarch.h b/retroarch.h index 6a41e57ab0..401a18f584 100644 --- a/retroarch.h +++ b/retroarch.h @@ -1764,8 +1764,6 @@ const gfx_ctx_driver_t *video_context_driver_init_first( enum gfx_ctx_api api, unsigned major, unsigned minor, bool hw_render_ctx, void **ctx_data); -bool video_context_driver_write_to_image_buffer(gfx_ctx_image_t *img); - bool video_context_driver_get_video_output_prev(void); bool video_context_driver_get_video_output_next(void);