From 18d4eebedb7f80493da87f8506ff0b2db796510a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 25 Oct 2012 19:37:43 +0200 Subject: draw_bmp: cosmetics, refactor Mostly pedantic bikeshedding issues. Move some code around, so that the sub_bitmap_to_mp_images() function can be split into two parts. This is better than having a big function with many input and outputs, of which only half are used in each code path. Also, try to make code simpler by using a mp_rect type. --- sub/sub.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sub/sub.h') diff --git a/sub/sub.h b/sub/sub.h index 4adf0a23d8..5013611e61 100644 --- a/sub/sub.h +++ b/sub/sub.h @@ -210,8 +210,8 @@ bool osd_draw_on_image(struct osd_state *osd, struct mp_osd_res res, double video_pts, int draw_flags, struct mp_image *dest, struct mp_csp_details *dest_csp); -bool sub_bitmaps_bb(struct sub_bitmaps *imgs, int *x1, int *y1, - int *x2, int *y2); +struct mp_rect; +bool sub_bitmaps_bb(struct sub_bitmaps *imgs, struct mp_rect *out_bb); // defined in osd_libass.c and osd_dummy.c -- cgit v1.2.3