10.3 support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,6 +101,9 @@ static void swizzleBitmap(void * data, int rowBytes, int height)
|
||||
* using CFRelease().
|
||||
* Returns NULL on an error.
|
||||
*/
|
||||
|
||||
extern CGColorSpaceRef wxMacGetGenericRGBColorSpace();
|
||||
|
||||
CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
||||
{
|
||||
CGContextRef bitmap;
|
||||
@@ -109,7 +112,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
||||
long bytewidth;
|
||||
GLint width, height;
|
||||
long bytes;
|
||||
CGColorSpaceRef cSpace = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
|
||||
|
||||
CGLContextObj glContextObj;
|
||||
CGLPixelFormatObj pixelFormatObj ;
|
||||
@@ -163,8 +165,7 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
||||
return NULL;
|
||||
}
|
||||
bitmap = CGBitmapContextCreate(data, width, height, 8, bytewidth,
|
||||
cSpace, kCGImageAlphaNoneSkipFirst /* XRGB */);
|
||||
CFRelease(cSpace);
|
||||
wxMacGetGenericRGBColorSpace(), kCGImageAlphaNoneSkipFirst /* XRGB */);
|
||||
|
||||
|
||||
/* Read framebuffer into our bitmap */
|
||||
|
Reference in New Issue
Block a user