summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-30 00:53:08 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-30 00:56:10 +0200
commitd46b86bc7c39082b26ec71aa16431f3275d836ff (patch)
tree035da87ed658f7d75c0eba5a5d4de5462a4c8ddd /libvo
parenta06b32b64e91082c11f747e2910f10a4afd3dfa9 (diff)
parent3e8f2815c19703f5cb6f75db2910234d499d9676 (diff)
downloadmpv-d46b86bc7c39082b26ec71aa16431f3275d836ff.tar.bz2
mpv-d46b86bc7c39082b26ec71aa16431f3275d836ff.tar.xz
Merge svn changes up to r30136
Ignore another broken correct-pts change in 30134.
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c62
-rw-r--r--libvo/x11_common.c2
-rw-r--r--libvo/x11_common.h2
3 files changed, 32 insertions, 34 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index ad23b7963a..9a2aafac31 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -284,8 +284,6 @@ static void clearEOSD(void) {
eosdtex = NULL;
}
-static void do_render_osd(int);
-
static inline int is_tinytex(ASS_Image *i, int tinytexcur) {
return i->w < TINYTEX_SIZE && i->h < TINYTEX_SIZE && tinytexcur < TINYTEX_MAX;
}
@@ -649,36 +647,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
*/
@@ -714,6 +682,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();
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index ea1f53971a..b6ab203a6a 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -707,7 +707,7 @@ void vo_x11_decoration(struct vo *vo, int d)
}
}
-void vo_x11_classhint(struct vo *vo, Window window, char *name)
+void vo_x11_classhint(struct vo *vo, Window window, const char *name)
{
struct vo_x11_state *x11 = vo->x11;
XClassHint wmClass;
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index fccad90ced..7f53a4c05c 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -110,7 +110,7 @@ struct vo_x11_state *vo_x11_init_state(void);
int vo_init(struct vo *vo);
void vo_uninit(struct vo_x11_state *x11);
void vo_x11_decoration(struct vo *vo, int d );
-void vo_x11_classhint(struct vo *vo, Window window, char *name);
+void vo_x11_classhint(struct vo *vo, Window window, const char *name);
void vo_x11_sizehint(struct vo *vo, int x, int y, int width, int height, int max);
int vo_x11_check_events(struct vo *vo);
void vo_x11_selectinput_witherr(Display *display, Window w, long event_mask);