From 61e40e77bf8474685e2c26bf672f983addbe6ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=AE=87=E8=88=AA?= Date: Sat, 21 Oct 2017 10:09:59 +0800 Subject: [PATCH] Fix show QR require GPU --- ShadowsocksX-NG/SWBQRCodeWindowController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShadowsocksX-NG/SWBQRCodeWindowController.m b/ShadowsocksX-NG/SWBQRCodeWindowController.m index a7e97e9..59b9fde 100644 --- a/ShadowsocksX-NG/SWBQRCodeWindowController.m +++ b/ShadowsocksX-NG/SWBQRCodeWindowController.m @@ -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];