gl/caopengllayer: draw asynchronously
This essentially makes the CAOpenGLLayer draw every refresh cycle.
This commit is contained in:
parent
f3273cafc4
commit
2ab0e1517f
@ -40,9 +40,11 @@
|
|||||||
- (id)initWithGstGLContext:(GstGLContextCocoa *)parent_gl_context {
|
- (id)initWithGstGLContext:(GstGLContextCocoa *)parent_gl_context {
|
||||||
[super init];
|
[super init];
|
||||||
|
|
||||||
GST_TRACE ("init CAOpenGLLayer");
|
GST_LOG ("init CAOpenGLLayer");
|
||||||
|
|
||||||
self->gst_gl_context = parent_gl_context;
|
self->gst_gl_context = parent_gl_context;
|
||||||
|
self.asynchronous = YES;
|
||||||
|
self.needsDisplayOnBoundsChange = YES;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -109,6 +111,8 @@
|
|||||||
- (void)resize:(NSRect)bounds {
|
- (void)resize:(NSRect)bounds {
|
||||||
const GstGLFuncs *gl = ((GstGLContext *)self->gst_gl_context)->gl_vtable;
|
const GstGLFuncs *gl = ((GstGLContext *)self->gst_gl_context)->gl_vtable;
|
||||||
|
|
||||||
|
GST_LOG ("resizing");
|
||||||
|
|
||||||
gl->GetIntegerv (GL_VIEWPORT, self->expected_dims);
|
gl->GetIntegerv (GL_VIEWPORT, self->expected_dims);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user