gl/cocoa: only draw once the window has been resized

It avoids to draw the first frame with an incorrect view port.
This commit is contained in:
Julien Isorce 2014-04-24 09:03:32 +01:00 committed by Tim-Philipp Müller
parent 545bed3c7a
commit 9db9834128

View file

@ -213,8 +213,6 @@ gst_gl_window_cocoa_draw (GstGLWindow * window, guint width, guint height)
GSRegisterCurrentThread(); GSRegisterCurrentThread();
app_thread_performer = [[AppThreadPerformer alloc] init:window_cocoa]; 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 /* useful when set_window_handle is called before
* the internal NSWindow */ * the internal NSWindow */
@ -258,6 +256,9 @@ gst_gl_window_cocoa_draw (GstGLWindow * window, guint width, guint height)
priv->visible = TRUE; priv->visible = TRUE;
} }
[app_thread_performer performSelector:@selector(updateWindow)
onThread:priv->thread withObject:nil waitUntilDone:YES];
[pool release]; [pool release];
} }