vlc | branch: master | Felix Paul Kühne <[email protected]> | Fri Nov 7 00:20:10 2014 +0100| [3ffa0a33b0b3452f6cf629c0436e5005ee87c7fd] | committer: Felix Paul Kühne
caopengllayer: use visible rect instead of layer bounds to determine the current output size > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ffa0a33b0b3452f6cf629c0436e5005ee87c7fd --- modules/video_output/caopengllayer.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m index 64c607a..462bfd9 100644 --- a/modules/video_output/caopengllayer.m +++ b/modules/video_output/caopengllayer.m @@ -306,7 +306,7 @@ static int Control (vout_display_t *vd, int query, va_list ap) /* we always use our current frame here */ vout_display_cfg_t cfg_tmp = *cfg; [CATransaction lock]; - CGRect bounds = [sys->cgLayer bounds]; + CGRect bounds = [sys->cgLayer visibleRect]; [CATransaction unlock]; cfg_tmp.display.width = bounds.size.width; cfg_tmp.display.height = bounds.size.height; @@ -395,7 +395,8 @@ static void *OurGetProcAddress (vlc_gl_t *gl, const char *name) self = [super init]; if (self) { [CATransaction lock]; - [self setAutoresizingMask: kCALayerWidthSizable | kCALayerHeightSizable]; + self.needsDisplayOnBoundsChange = YES; + self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; self.asynchronous = NO; [CATransaction unlock]; } @@ -412,7 +413,8 @@ static void *OurGetProcAddress (vlc_gl_t *gl, const char *name) { [super resizeWithOldSuperlayerSize: size]; - CGSize boundsSize = self.bounds.size; + CGSize boundsSize = self.visibleRect.size; + if (_vd) vout_display_SendEventDisplaySize(_vd, boundsSize.width, boundsSize.height); } @@ -435,7 +437,8 @@ static void *OurGetProcAddress (vlc_gl_t *gl, const char *name) if (!sys->vgl) return; - CGRect bounds = [self bounds]; + CGRect bounds = [self visibleRect]; + // x / y are top left corner, but we need the lower left one glViewport (sys->place.x, bounds.size.height - (sys->place.y + sys->place.height), sys->place.width, sys->place.height); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
