Fix show QR require GPU

This commit is contained in:
秦宇航
2017-10-21 10:09:59 +08:00
parent 682fc346f8
commit 61e40e77bf
+2 -2
View File
@@ -50,9 +50,9 @@
CGContextRef bitmapRef = CGBitmapContextCreate(nil, width, height, 8, 0, cs, (CGBitmapInfo)kCGImageAlphaNone);
#if TARGET_OS_IPHONE
CIContext *context = [CIContext contextWithOptions:nil];
CIContext *context = [CIContext contextWithOptions: @{kCIContextUseSoftwareRenderer: true}];
#else
CIContext *context = [CIContext contextWithCGContext:bitmapRef options:nil];
CIContext *context = [CIContext contextWithCGContext:bitmapRef options:@{kCIContextUseSoftwareRenderer: @true}];
#endif
CGImageRef bitmapImage = [context createCGImage:image fromRect:extent];