Bug 676248 - Make the window GL context transparent on OSX. r=bgirard

This commit is contained in:
Markus Stange 2013-03-11 12:29:00 -04:00
parent c2e09db365
commit 09292dc7dc

View File

@ -322,7 +322,7 @@ GLContextProviderCGL::CreateForWindow(nsIWidget *aWidget)
GLContextCGL *shareContext = GetGlobalContextCGL();
NSOpenGLContext *context = [[NSOpenGLContext alloc]
NSOpenGLContext *context = [[NSOpenGLContext alloc]
initWithFormat:sCGLLibrary.PixelFormat()
shareContext:(shareContext ? shareContext->mContext : NULL)];
if (!context) {
@ -330,6 +330,9 @@ GLContextProviderCGL::CreateForWindow(nsIWidget *aWidget)
}
// make the context transparent
GLint opaque = 0;
[context setValues:&opaque forParameter:NSOpenGLCPSurfaceOpacity];
SurfaceCaps caps = SurfaceCaps::ForRGBA();
nsRefPtr<GLContextCGL> glContext = new GLContextCGL(caps,
shareContext,