From 162dfcdf757b9bd02ed8232ebc0527481973ef7e Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Thu, 24 Apr 2014 09:03:32 +0100 Subject: [PATCH] gl/cocoa: only draw once the window has been resized It avoids to draw the first frame with an incorrect view port. --- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 509d574..d0ec341 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -213,8 +213,6 @@ gst_gl_window_cocoa_draw (GstGLWindow * window, guint width, guint height) GSRegisterCurrentThread(); app_thread_performer = [[AppThreadPerformer alloc] init:window_cocoa]; - [app_thread_performer performSelector:@selector(updateWindow) - onThread:priv->thread withObject:nil waitUntilDone:YES]; /* useful when set_window_handle is called before * the internal NSWindow */ @@ -258,6 +256,9 @@ gst_gl_window_cocoa_draw (GstGLWindow * window, guint width, guint height) priv->visible = TRUE; } + [app_thread_performer performSelector:@selector(updateWindow) + onThread:priv->thread withObject:nil waitUntilDone:YES]; + [pool release]; } -- 2.7.4