gl/caopengllayer: draw asynchronously
authorMatthew Waters <matthew@centricular.com>
Thu, 29 Jan 2015 04:26:21 +0000 (15:26 +1100)
committerMatthew Waters <matthew@centricular.com>
Thu, 29 Jan 2015 07:32:04 +0000 (18:32 +1100)
This essentially makes the CAOpenGLLayer draw every refresh cycle.

gst-libs/gst/gl/cocoa/gstglcaopengllayer.m

index 42afd88..bb7e320 100644 (file)
 - (id)initWithGstGLContext:(GstGLContextCocoa *)parent_gl_context {
   [super init];
 
-  GST_TRACE ("init CAOpenGLLayer");
+  GST_LOG ("init CAOpenGLLayer");
 
   self->gst_gl_context = parent_gl_context;
+  self.asynchronous = YES;
+  self.needsDisplayOnBoundsChange = YES;
 
   return self;
 }
 - (void)resize:(NSRect)bounds {
   const GstGLFuncs *gl = ((GstGLContext *)self->gst_gl_context)->gl_vtable;
 
+  GST_LOG ("resizing");
+
   gl->GetIntegerv (GL_VIEWPORT, self->expected_dims);
 }