changeset 36229:430a2b6238bb

matrixview: redraw image while scaling on OSX.
author reimar
date Sun, 09 Jun 2013 22:26:52 +0000
parents 1a1d0d3220e7
children a1e1633fd45b
files libvo/vo_matrixview.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_matrixview.c	Sun Jun 09 22:25:47 2013 +0000
+++ b/libvo/vo_matrixview.c	Sun Jun 09 22:26:52 2013 +0000
@@ -92,6 +92,11 @@
     matrixview_brightness_set(brightness);
 }
 
+static void resize(void)
+{
+    matrixview_reshape(vo_dwidth, vo_dheight);
+    flip_page();
+}
 
 static int config(uint32_t width, uint32_t height,
                   uint32_t d_width, uint32_t d_height,
@@ -130,6 +135,10 @@
     contrast_set(eq_contrast);
     brightness_set(eq_brightness);
     matrixview_reshape(vo_dwidth, vo_dheight);
+
+#ifdef CONFIG_GL_OSX
+    vo_osx_redraw_func = resize;
+#endif
     return 0;
 }
 
@@ -138,7 +147,7 @@
 {
     int e = glctx.check_events();
     if (e & VO_EVENT_RESIZE) {
-        matrixview_reshape(vo_dwidth, vo_dheight);
+        resize();
     }
     if (e & VO_EVENT_EXPOSE && int_pause)
         flip_page();
@@ -262,7 +271,7 @@
         return VO_TRUE;
     case VOCTRL_FULLSCREEN:
         glctx.fullscreen();
-        matrixview_reshape(vo_dwidth, vo_dheight);
+        resize();
         return VO_TRUE;
     case VOCTRL_BORDER:
         glctx.border();