sub, VO: remove vo_osd_resized() function

VOs which could render the OSD in window size (as opposed to video size,
like vo_xv) and which could cache the OSD called this when the window
size changed. This was needed, because VOs used another OSD function to
check whether the OSD changed before passing the new window size to the
OSD code.

This was really just an artifact of OSD change detection, and now that
the affected VOs use the new OSD rendering API, it's done automatically.
This commit is contained in:
wm4 2012-10-04 17:16:28 +02:00
parent 2db0d229ef
commit 34b3a9c5e9
8 changed files with 5 additions and 18 deletions

View File

@ -1598,7 +1598,8 @@ static int mp_property_sub_scale(m_option_t *prop, int action, void *arg,
if (opts->ass_enabled)
opts->ass_font_scale = *(float *) arg;
text_font_scale_factor = *(float *) arg;
vo_osd_resized();
vo_osd_changed(OSDTYPE_SUBTITLE);
vo_osd_changed(OSDTYPE_OSD);
return M_PROPERTY_OK;
case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN:
@ -1610,7 +1611,8 @@ static int mp_property_sub_scale(m_option_t *prop, int action, void *arg,
text_font_scale_factor += (arg ? *(float *) arg : 0.1) *
(action == M_PROPERTY_STEP_UP ? 1.0 : -1.0);
M_PROPERTY_CLAMP(prop, text_font_scale_factor);
vo_osd_resized();
vo_osd_changed(OSDTYPE_SUBTITLE);
vo_osd_changed(OSDTYPE_OSD);
return M_PROPERTY_OK;
default:
if (opts->ass_enabled)

View File

@ -91,8 +91,6 @@ static void resize(struct vo *vo, int width, int height)
gl->MatrixMode(GL_MODELVIEW);
gl->LoadIdentity();
vo_osd_resized();
gl->Clear(GL_COLOR_BUFFER_BIT);
vo->want_redraw = true;
}

View File

@ -850,8 +850,6 @@ static bool resize_d3d(d3d_priv *priv)
calc_fs_rect(priv);
vo_osd_resized();
priv->vo->want_redraw = true;
return 1;

View File

@ -145,7 +145,6 @@ static void resize(struct vo *vo, int x, int y)
gl->MatrixMode(GL_MODELVIEW);
gl->LoadIdentity();
vo_osd_resized();
gl->Clear(GL_COLOR_BUFFER_BIT);
vo->want_redraw = true;
}

View File

@ -1210,7 +1210,6 @@ static void resize(struct gl_priv *p)
update_window_sized_objects(p);
update_all_uniforms(p);
vo_osd_resized();
gl->Clear(GL_COLOR_BUFFER_BIT);
vo->want_redraw = true;
}

View File

@ -385,7 +385,7 @@ static void resize(struct vo *vo)
vc->src_rect_vid.y1 = vc->flip ? src_rect.top : src_rect.bottom;
vc->border_x = borders.left;
vc->border_y = borders.top;
vo_osd_resized();
int flip_offset_ms = vo_fs ? vc->flip_offset_fs : vc->flip_offset_window;
vo->flip_queue_offset = flip_offset_ms / 1000.;

View File

@ -301,14 +301,6 @@ void vo_osd_reset_changed(void)
osd->objs[n]->force_redraw = false;
}
void vo_osd_resized(void)
{
// Counter the typical vo_osd_has_changed(osd) call in VO's draw_osd()
struct osd_state *osd = global_osd;
for (int n = 0; n < MAX_OSD_PARTS; n++)
osd->objs[n]->force_redraw = true;
}
bool sub_bitmaps_bb(struct sub_bitmaps *imgs, int *x1, int *y1,
int *x2, int *y2)
{

View File

@ -169,7 +169,6 @@ void osd_update(struct osd_state *osd, int dxs, int dys);
void vo_osd_changed(int new_value);
void vo_osd_reset_changed(void);
bool vo_osd_has_changed(struct osd_state *osd);
void vo_osd_resized(void);
void osd_free(struct osd_state *osd);
bool sub_bitmaps_bb(struct sub_bitmaps *imgs, int *x1, int *y1,