summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-27 14:31:13 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-27 14:31:13 +0000
commit51e55db62ed6f3e9a22ae4e5e1c99522933fd15d (patch)
tree02d0c2f8390f3e8b1c4714e8acee931f1e57dd95 /libvo
parenta5ee26b559959f3049677fd47f4c3619f0c57fd6 (diff)
downloadmpv-51e55db62ed6f3e9a22ae4e5e1c99522933fd15d.tar.bz2
mpv-51e55db62ed6f3e9a22ae4e5e1c99522933fd15d.tar.xz
Move do_render_osd function to avoid a forward declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30126 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c62
1 files changed, 30 insertions, 32 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 5e35f79f99..5ea2c3c726 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -287,8 +287,6 @@ static void clearEOSD(void) {
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 @@ static void create_osd_texture(int x0, int y0, int w, int h,
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 do_render_osd(int type) {
}
}
+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();