From 92b09a9f604cb1663a4cffe91f383d3833d4b2ff Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 10 Mar 2020 19:10:02 +0100 Subject: [PATCH] (Video layout) Get rid of video_frame_info dependency --- gfx/drivers/gl.c | 2 +- gfx/video_layout.c | 7 +++---- gfx/video_layout.h | 15 +++++---------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 492e26ca3c..4052618a19 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2589,7 +2589,7 @@ static void gl2_video_layout_render(gl_t *gl, video_frame_info_t *video_info) glEnable(GL_BLEND); for (i = 0; i < video_layout_layer_count(); ++i) - video_layout_layer_render(video_info, i); + video_layout_layer_render(i); glDisable(GL_BLEND); } diff --git a/gfx/video_layout.c b/gfx/video_layout.c index bc35004ce1..4515bd560d 100644 --- a/gfx/video_layout.c +++ b/gfx/video_layout.c @@ -32,7 +32,8 @@ #include "../retroarch.h" #include "../verbosity.h" -bool video_layout_load_internal(view_array_t *view_array, rxml_document_t *doc); +bool video_layout_load_internal(view_array_t *view_array, + rxml_document_t *doc); typedef struct io { @@ -374,7 +375,7 @@ int video_layout_layer_count(void) return video_layout_state->view->layers_count; } -void video_layout_layer_render(void *video_driver_frame_data, int index) +void video_layout_layer_render(int index) { unsigned i, j; video_layout_render_info_t *info = &video_layout_state->render_info; @@ -382,8 +383,6 @@ void video_layout_layer_render(void *video_driver_frame_data, int index) layer_t *layer = &video_layout_state->view->layers[index]; - info->video_driver_frame_data = video_driver_frame_data; - r->layer_begin(info); for (i = 0; i < layer->elements_count; ++i) diff --git a/gfx/video_layout.h b/gfx/video_layout.h index fa9390dd16..cf60f20b14 100644 --- a/gfx/video_layout.h +++ b/gfx/video_layout.h @@ -29,14 +29,11 @@ typedef struct video_layout_render_info { - void *video_driver_data; - void *video_driver_frame_data; - video_layout_bounds_t bounds; video_layout_orientation_t orientation; video_layout_color_t color; -} -video_layout_render_info_t; + void *video_driver_data; +} video_layout_render_info_t; typedef enum video_layout_led { @@ -46,8 +43,7 @@ typedef enum video_layout_led VIDEO_LAYOUT_LED_14_SC, /* alphanumeric with ., */ VIDEO_LAYOUT_LED_16, /* full alphanumeric */ VIDEO_LAYOUT_LED_16_SC /* full alphanumeric with ., */ -} -video_layout_led_t; +} video_layout_led_t; typedef struct video_layout_render_interface { @@ -66,8 +62,7 @@ typedef struct video_layout_render_interface void (*led_seg) (const video_layout_render_info_t *info, video_layout_led_t seg_layout, int seg_mask); void (*layer_end) (const video_layout_render_info_t *info, video_layout_blend_t blend_type); -} -video_layout_render_interface_t; +} video_layout_render_interface_t; void video_layout_init (void *video_driver_data, const video_layout_render_interface_t *render); void video_layout_deinit (void); @@ -91,7 +86,7 @@ bool video_layout_view_on_change (void); void video_layout_view_fit_bounds (video_layout_bounds_t bounds); int video_layout_layer_count (void); -void video_layout_layer_render (void *video_driver_frame_data, int index); +void video_layout_layer_render (int index); const video_layout_bounds_t *video_layout_screen (int index);