[837/906] cocoa: resize OpenGL view size each time the window is resized

Fixes glitches that can appear when the OpenGL view has not been resized
after a window resize.

https://bugzilla.gnome.org/show_bug.cgi?id=711672
This commit is contained in:
Matthieu Bouron 2013-11-08 12:12:26 +00:00 committed by Tim-Philipp Müller
parent cc0b1f3e05
commit 32265d7e4e
2 changed files with 9 additions and 15 deletions

View file

@ -66,7 +66,6 @@ struct _GstGLContextCocoaPrivate
@interface GstGLNSOpenGLView: NSOpenGLView { @interface GstGLNSOpenGLView: NSOpenGLView {
GstGLWindowCocoa *m_cocoa; GstGLWindowCocoa *m_cocoa;
gint m_resizeCount;
} }
- (id) initWithFrame:(GstGLWindowCocoa *)window rect:(NSRect)contentRect - (id) initWithFrame:(GstGLWindowCocoa *)window rect:(NSRect)contentRect
pixelFormat:(NSOpenGLPixelFormat *)fmt; pixelFormat:(NSOpenGLPixelFormat *)fmt;

View file

@ -449,7 +449,6 @@ gst_gl_window_cocoa_send_message_async (GstGLWindow * window,
self = [super initWithFrame: contentRect pixelFormat: fmt]; self = [super initWithFrame: contentRect pixelFormat: fmt];
m_cocoa = window; m_cocoa = window;
m_resizeCount = 0;
#ifndef GNUSTEP #ifndef GNUSTEP
[self setWantsLayer:NO]; [self setWantsLayer:NO];
@ -463,8 +462,6 @@ gst_gl_window_cocoa_send_message_async (GstGLWindow * window,
window = GST_GL_WINDOW (m_cocoa); window = GST_GL_WINDOW (m_cocoa);
if (m_resizeCount % 5 == 0) {
m_resizeCount = 0;
if (window->resize) { if (window->resize) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@ -479,8 +476,6 @@ gst_gl_window_cocoa_send_message_async (GstGLWindow * window,
[pool release]; [pool release];
} }
} }
m_resizeCount++;
}
- (void) update { - (void) update {
} }