mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Get rid of video_context_driver_write_to_image_buffer
This commit is contained in:
parent
8dc7524e43
commit
3e04b158ab
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
11
retroarch.c
11
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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user