From 5279342396d426c6d30bf833173ee373fe95ca49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 1 Oct 2014 11:55:13 +0300 Subject: gl/cocoa: Handle NSView::renewGState() properly Don't update the screen until we redraw, this prevents flickering during scrolling, clipping, resizing, etc --- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index f0333b94c..cc88160cb 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -549,6 +549,16 @@ resize_cb (gpointer data) gst_object_unref (context); } +- (void)renewGState { + /* Don't update the screen until we redraw, this + * prevents flickering during scrolling, clipping, + * resizing, etc + */ + [[self window] disableScreenUpdatesUntilFlush]; + + [super renewGState]; +} + - (void)drawRect: (NSRect)dirtyRect { [self reshape]; } -- cgit v1.2.1