TBR=mallinath@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1895004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4420 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ea40bd0cc8
commit
7694562805
@ -19,7 +19,7 @@ using namespace webrtc;
|
||||
|
||||
-(void)initCocoaRenderView:(NSOpenGLPixelFormat*)fmt{
|
||||
|
||||
self = [super initWithFrame:[self frame] pixelFormat:[fmt autorelease]];
|
||||
self = [super initWithFrame:[self frame] pixelFormat:fmt];
|
||||
if (self == nil){
|
||||
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);
|
||||
@ -39,7 +39,7 @@ using namespace webrtc;
|
||||
NSRect screenRect = [[NSScreen mainScreen]frame];
|
||||
// [_windowRef setFrame:screenRect];
|
||||
// [_windowRef setBounds:screenRect];
|
||||
self = [super initWithFrame:screenRect pixelFormat:[fmt autorelease]];
|
||||
self = [super initWithFrame:screenRect pixelFormat:fmt];
|
||||
if (self == nil){
|
||||
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);
|
||||
|
@ -556,7 +556,8 @@ int VideoRenderNSOpenGL::setRenderTargetWindow()
|
||||
0
|
||||
};
|
||||
|
||||
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs];
|
||||
NSOpenGLPixelFormat* fmt = [[[NSOpenGLPixelFormat alloc] initWithAttributes:
|
||||
(NSOpenGLPixelFormatAttribute*) attribs] autorelease];
|
||||
|
||||
if(_windowRef)
|
||||
{
|
||||
@ -568,8 +569,6 @@ int VideoRenderNSOpenGL::setRenderTargetWindow()
|
||||
return -1;
|
||||
}
|
||||
|
||||
[fmt release];
|
||||
|
||||
_nsglContext = [_windowRef nsOpenGLContext];
|
||||
[_nsglContext makeCurrentContext];
|
||||
|
||||
@ -597,7 +596,8 @@ int VideoRenderNSOpenGL::setRenderTargetFullScreen()
|
||||
0
|
||||
};
|
||||
|
||||
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs];
|
||||
NSOpenGLPixelFormat* fmt = [[[NSOpenGLPixelFormat alloc] initWithAttributes:
|
||||
(NSOpenGLPixelFormatAttribute*) attribs] autorelease];
|
||||
|
||||
// Store original superview and frame for use when exiting full screens
|
||||
_windowRefSuperViewFrame = [_windowRef frame];
|
||||
@ -624,8 +624,6 @@ int VideoRenderNSOpenGL::setRenderTargetFullScreen()
|
||||
return -1;
|
||||
}
|
||||
|
||||
[fmt release];
|
||||
|
||||
_nsglContext = [_windowRef nsOpenGLContext];
|
||||
[_nsglContext makeCurrentContext];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user