(Video layout) Get rid of video_frame_info dependency

This commit is contained in:
twinaphex 2020-03-10 19:10:02 +01:00
parent abcfe03059
commit 92b09a9f60
3 changed files with 9 additions and 15 deletions

View File

@ -2589,7 +2589,7 @@ static void gl2_video_layout_render(gl_t *gl, video_frame_info_t *video_info)
glEnable(GL_BLEND); glEnable(GL_BLEND);
for (i = 0; i < video_layout_layer_count(); ++i) for (i = 0; i < video_layout_layer_count(); ++i)
video_layout_layer_render(video_info, i); video_layout_layer_render(i);
glDisable(GL_BLEND); glDisable(GL_BLEND);
} }

View File

@ -32,7 +32,8 @@
#include "../retroarch.h" #include "../retroarch.h"
#include "../verbosity.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 typedef struct io
{ {
@ -374,7 +375,7 @@ int video_layout_layer_count(void)
return video_layout_state->view->layers_count; 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; unsigned i, j;
video_layout_render_info_t *info = &video_layout_state->render_info; 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 = layer_t *layer =
&video_layout_state->view->layers[index]; &video_layout_state->view->layers[index];
info->video_driver_frame_data = video_driver_frame_data;
r->layer_begin(info); r->layer_begin(info);
for (i = 0; i < layer->elements_count; ++i) for (i = 0; i < layer->elements_count; ++i)

View File

@ -29,14 +29,11 @@
typedef struct video_layout_render_info typedef struct video_layout_render_info
{ {
void *video_driver_data;
void *video_driver_frame_data;
video_layout_bounds_t bounds; video_layout_bounds_t bounds;
video_layout_orientation_t orientation; video_layout_orientation_t orientation;
video_layout_color_t color; video_layout_color_t color;
} void *video_driver_data;
video_layout_render_info_t; } video_layout_render_info_t;
typedef enum video_layout_led typedef enum video_layout_led
{ {
@ -46,8 +43,7 @@ typedef enum video_layout_led
VIDEO_LAYOUT_LED_14_SC, /* alphanumeric with ., */ VIDEO_LAYOUT_LED_14_SC, /* alphanumeric with ., */
VIDEO_LAYOUT_LED_16, /* full alphanumeric */ VIDEO_LAYOUT_LED_16, /* full alphanumeric */
VIDEO_LAYOUT_LED_16_SC /* full alphanumeric with ., */ VIDEO_LAYOUT_LED_16_SC /* full alphanumeric with ., */
} } video_layout_led_t;
video_layout_led_t;
typedef struct video_layout_render_interface 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 (*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); 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_init (void *video_driver_data, const video_layout_render_interface_t *render);
void video_layout_deinit (void); 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); void video_layout_view_fit_bounds (video_layout_bounds_t bounds);
int video_layout_layer_count (void); 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 const video_layout_bounds_t
*video_layout_screen (int index); *video_layout_screen (int index);