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:
@ -19,7 +19,7 @@ using namespace webrtc;
|
|||||||
|
|
||||||
-(void)initCocoaRenderView:(NSOpenGLPixelFormat*)fmt{
|
-(void)initCocoaRenderView:(NSOpenGLPixelFormat*)fmt{
|
||||||
|
|
||||||
self = [super initWithFrame:[self frame] pixelFormat:[fmt autorelease]];
|
self = [super initWithFrame:[self frame] pixelFormat:fmt];
|
||||||
if (self == nil){
|
if (self == nil){
|
||||||
|
|
||||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);
|
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];
|
NSRect screenRect = [[NSScreen mainScreen]frame];
|
||||||
// [_windowRef setFrame:screenRect];
|
// [_windowRef setFrame:screenRect];
|
||||||
// [_windowRef setBounds:screenRect];
|
// [_windowRef setBounds:screenRect];
|
||||||
self = [super initWithFrame:screenRect pixelFormat:[fmt autorelease]];
|
self = [super initWithFrame:screenRect pixelFormat:fmt];
|
||||||
if (self == nil){
|
if (self == nil){
|
||||||
|
|
||||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);
|
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);
|
||||||
|
@ -556,7 +556,8 @@ int VideoRenderNSOpenGL::setRenderTargetWindow()
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs];
|
NSOpenGLPixelFormat* fmt = [[[NSOpenGLPixelFormat alloc] initWithAttributes:
|
||||||
|
(NSOpenGLPixelFormatAttribute*) attribs] autorelease];
|
||||||
|
|
||||||
if(_windowRef)
|
if(_windowRef)
|
||||||
{
|
{
|
||||||
@ -568,8 +569,6 @@ int VideoRenderNSOpenGL::setRenderTargetWindow()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
[fmt release];
|
|
||||||
|
|
||||||
_nsglContext = [_windowRef nsOpenGLContext];
|
_nsglContext = [_windowRef nsOpenGLContext];
|
||||||
[_nsglContext makeCurrentContext];
|
[_nsglContext makeCurrentContext];
|
||||||
|
|
||||||
@ -597,7 +596,8 @@ int VideoRenderNSOpenGL::setRenderTargetFullScreen()
|
|||||||
0
|
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
|
// Store original superview and frame for use when exiting full screens
|
||||||
_windowRefSuperViewFrame = [_windowRef frame];
|
_windowRefSuperViewFrame = [_windowRef frame];
|
||||||
@ -624,8 +624,6 @@ int VideoRenderNSOpenGL::setRenderTargetFullScreen()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
[fmt release];
|
|
||||||
|
|
||||||
_nsglContext = [_windowRef nsOpenGLContext];
|
_nsglContext = [_windowRef nsOpenGLContext];
|
||||||
[_nsglContext makeCurrentContext];
|
[_nsglContext makeCurrentContext];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user