Mercurial > mplayer.hg
changeset 30084:90755c6344c7
Move do_render_osd function to avoid a forward declaration.
author | reimar |
---|---|
date | Sun, 27 Dec 2009 14:31:13 +0000 |
parents | 8375205ecdcc |
children | 69799b95e74e |
files | libvo/vo_gl.c |
diffstat | 1 files changed, 30 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl.c Sun Dec 27 14:19:48 2009 +0000 +++ b/libvo/vo_gl.c Sun Dec 27 14:31:13 2009 +0000 @@ -287,8 +287,6 @@ eosdtex = NULL; } -static void do_render_osd(int); - static inline int is_tinytex(ass_image_t *i, int tinytexcur) { return i->w < TINYTEX_SIZE && i->h < TINYTEX_SIZE && tinytexcur < TINYTEX_MAX; } @@ -660,36 +658,6 @@ osdtexCnt++; } -static void draw_osd(void) -{ - if (!use_osd) return; - if (vo_osd_changed(0)) { - int osd_h, osd_w; - clearOSD(); - osd_w = scaled_osd ? image_width : vo_dwidth; - osd_h = scaled_osd ? image_height : vo_dheight; - vo_draw_text_ext(osd_w, osd_h, ass_border_x, ass_border_y, ass_border_x, ass_border_y, - image_width, image_height, create_osd_texture); - } - if (vo_doublebuffering) do_render_osd(1); -} - -static void do_render(void) { -// Enable(GL_TEXTURE_2D); -// BindTexture(GL_TEXTURE_2D, texture_id); - - Color3f(1,1,1); - if (image_format == IMGFMT_YV12 || custom_prog) - glEnableYUVConversion(gl_target, yuvconvtype); - glDrawTex(0, 0, image_width, image_height, - 0, 0, image_width, image_height, - texture_width, texture_height, - use_rectangle == 1, image_format == IMGFMT_YV12, - mpi_flipped ^ vo_flipped); - if (image_format == IMGFMT_YV12 || custom_prog) - glDisableYUVConversion(gl_target, yuvconvtype); -} - /** * \param type bit 0: render OSD, bit 1: render EOSD */ @@ -725,6 +693,36 @@ } } +static void draw_osd(void) +{ + if (!use_osd) return; + if (vo_osd_changed(0)) { + int osd_h, osd_w; + clearOSD(); + osd_w = scaled_osd ? image_width : vo_dwidth; + osd_h = scaled_osd ? image_height : vo_dheight; + vo_draw_text_ext(osd_w, osd_h, ass_border_x, ass_border_y, ass_border_x, ass_border_y, + image_width, image_height, create_osd_texture); + } + if (vo_doublebuffering) do_render_osd(1); +} + +static void do_render(void) { +// Enable(GL_TEXTURE_2D); +// BindTexture(GL_TEXTURE_2D, texture_id); + + Color3f(1,1,1); + if (image_format == IMGFMT_YV12 || custom_prog) + glEnableYUVConversion(gl_target, yuvconvtype); + glDrawTex(0, 0, image_width, image_height, + 0, 0, image_width, image_height, + texture_width, texture_height, + use_rectangle == 1, image_format == IMGFMT_YV12, + mpi_flipped ^ vo_flipped); + if (image_format == IMGFMT_YV12 || custom_prog) + glDisableYUVConversion(gl_target, yuvconvtype); +} + static void flip_page(void) { if (vo_doublebuffering) { if (use_glFinish) Finish();