gfx_display_rotate_z - get rid of video_frame_info dependency

This commit is contained in:
twinaphex 2020-03-08 22:33:11 +01:00
parent e4aa0fd544
commit 6cb6f76add
8 changed files with 18 additions and 20 deletions

View File

@ -937,7 +937,7 @@ void gfx_display_draw_texture(
draw.pipeline.id = 0;
coords.color = (const float*)color;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
draw.texture = texture;
draw.x = x;
@ -1027,7 +1027,7 @@ void gfx_display_draw_texture_slice(
draw.pipeline.id = 0;
coords.color = (const float*)(color == NULL ? colors : color);
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
draw.texture = texture;
draw.x = 0;
@ -1233,8 +1233,7 @@ void gfx_display_draw_texture_slice(
free(tex_coord);
}
void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw,
video_frame_info_t *video_info)
void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw, void *data)
{
math_matrix_4x4 matrix_rotated, matrix_scaled;
math_matrix_4x4 *b = NULL;
@ -1247,7 +1246,7 @@ void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw,
)
return;
b = (math_matrix_4x4*)dispctx->get_default_mvp(video_info->userdata);
b = (math_matrix_4x4*)dispctx->get_default_mvp(data);
if (!b)
return;

View File

@ -308,8 +308,7 @@ void gfx_display_draw_texture_slice(
unsigned new_w, unsigned new_h, unsigned width, unsigned height,
float *color, unsigned offset, float scale_factor, uintptr_t texture);
void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw,
video_frame_info_t *video_info);
void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw, void *data);
font_data_t *gfx_display_font_file(char* fontpath, float font_size, bool is_threaded);

View File

@ -727,7 +727,7 @@ void gfx_thumbnail_draw(
rotate_draw.scale_z = 1.0f;
rotate_draw.scale_enable = false;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
/* Configure draw object
* > Note: Colour, width/height and position must

View File

@ -759,7 +759,7 @@ static void gfx_widgets_draw_icon(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
coords.vertices = 4;
coords.vertex = NULL;
@ -808,7 +808,7 @@ static void gfx_widgets_draw_icon_blend(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
coords.vertices = 4;
coords.vertex = NULL;

View File

@ -1730,7 +1730,7 @@ static void materialui_draw_icon(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
coords.vertices = 4;
coords.vertex = NULL;

View File

@ -225,7 +225,7 @@ void ozone_draw_icon(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
coords.vertices = 4;
coords.vertex = NULL;

View File

@ -2536,7 +2536,7 @@ static int stripes_draw_item(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
stripes_draw_icon(video_info,
stripes->icon_size,
@ -2610,7 +2610,7 @@ static void stripes_draw_items(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
@ -2846,7 +2846,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
gfx_display_blend_begin(video_info->userdata);
/* Horizontal stripes */
@ -2916,7 +2916,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
stripes_draw_icon(video_info,
stripes->icon_size,

View File

@ -3294,7 +3294,7 @@ static int xmb_draw_item(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
xmb_draw_icon(video_info,
xmb->icon_size,
@ -3362,7 +3362,7 @@ static void xmb_draw_items(
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
@ -4419,7 +4419,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
/**************************/
/* Draw thumbnails: START */
@ -4799,7 +4799,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
rotate_draw.scale_z = 1;
rotate_draw.scale_enable = true;
gfx_display_rotate_z(&rotate_draw, video_info);
gfx_display_rotate_z(&rotate_draw, video_info->userdata);
xmb_draw_icon(video_info,
xmb->icon_size,