summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-10-01 11:55:13 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-10-14 10:01:25 +0200
commit5279342396d426c6d30bf833173ee373fe95ca49 (patch)
treeeb834669ba3ebbebd9a2faa2d2ba6b4b937b23d8
parent308e80742a01756dbc6ee4d09f1202c7c9ccfac9 (diff)
downloadgstreamer-plugins-bad-5279342396d426c6d30bf833173ee373fe95ca49.tar.gz
gl/cocoa: Handle NSView::renewGState() properly
Don't update the screen until we redraw, this prevents flickering during scrolling, clipping, resizing, etc
-rw-r--r--gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m10
1 files changed, 10 insertions, 0 deletions
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];
}