Mercurial > mplayer.hg
comparison libvo/vo_gl.c @ 35382:b85d632c3fe1
vo_gl: react to expose events even when not paused.
This improves behaviour for slideshows, though it will
cause worse performance when there are a lot of expose
events (e.g. when dragging some other window over the
video window, or when no hardware mouse support is
available).
author | reimar |
---|---|
date | Sun, 25 Nov 2012 14:40:41 +0000 |
parents | 9abac64d7a11 |
children | 67de02ade8af |
comparison
equal
deleted
inserted
replaced
35381:746e2e0577b2 | 35382:b85d632c3fe1 |
---|---|
149 static int mipmap_gen; | 149 static int mipmap_gen; |
150 static int stereo_mode; | 150 static int stereo_mode; |
151 static int stipple; | 151 static int stipple; |
152 static enum MPGLType backend; | 152 static enum MPGLType backend; |
153 | 153 |
154 static int int_pause; | |
155 static int eq_bri = 0; | 154 static int eq_bri = 0; |
156 static int eq_cont = 0; | 155 static int eq_cont = 0; |
157 static int eq_sat = 0; | 156 static int eq_sat = 0; |
158 static int eq_hue = 0; | 157 static int eq_hue = 0; |
159 static int eq_rgamma = 0; | 158 static int eq_rgamma = 0; |
709 image_format = format; | 708 image_format = format; |
710 is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0; | 709 is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0; |
711 is_yuv |= (xs << 8) | (ys << 16); | 710 is_yuv |= (xs << 8) | (ys << 16); |
712 glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); | 711 glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); |
713 | 712 |
714 int_pause = 0; | |
715 vo_flipped = !!(flags & VOFLAG_FLIPPING); | 713 vo_flipped = !!(flags & VOFLAG_FLIPPING); |
716 | 714 |
717 if (create_window(d_width, d_height, flags, title) < 0) | 715 if (create_window(d_width, d_height, flags, title) < 0) |
718 return -1; | 716 return -1; |
719 | 717 |
739 if(e&VO_EVENT_REINIT) { | 737 if(e&VO_EVENT_REINIT) { |
740 uninitGl(); | 738 uninitGl(); |
741 initGl(vo_dwidth, vo_dheight); | 739 initGl(vo_dwidth, vo_dheight); |
742 } | 740 } |
743 if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); | 741 if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); |
744 if(e&VO_EVENT_EXPOSE && int_pause) redraw(); | 742 else if(e&VO_EVENT_EXPOSE) redraw(); |
745 } | 743 } |
746 | 744 |
747 /** | 745 /** |
748 * Creates the textures and the display list needed for displaying | 746 * Creates the textures and the display list needed for displaying |
749 * an OSD part. | 747 * an OSD part. |
1420 }; | 1418 }; |
1421 | 1419 |
1422 static int control(uint32_t request, void *data) | 1420 static int control(uint32_t request, void *data) |
1423 { | 1421 { |
1424 switch (request) { | 1422 switch (request) { |
1425 case VOCTRL_PAUSE: | |
1426 case VOCTRL_RESUME: | |
1427 int_pause = (request == VOCTRL_PAUSE); | |
1428 return VO_TRUE; | |
1429 case VOCTRL_QUERY_FORMAT: | 1423 case VOCTRL_QUERY_FORMAT: |
1430 return query_format(*(uint32_t*)data); | 1424 return query_format(*(uint32_t*)data); |
1431 case VOCTRL_GET_IMAGE: | 1425 case VOCTRL_GET_IMAGE: |
1432 return get_image(data); | 1426 return get_image(data); |
1433 case VOCTRL_DRAW_IMAGE: | 1427 case VOCTRL_DRAW_IMAGE: |