小编rse*_*bbe的帖子

当app在后台时,使用Core Image阻止GPU访问的正确方法

我遇到了来自客户的崩溃,有以下回溯:

0   libGPUSupportMercury.dylib          0x3542ae2e gpus_ReturnNotPermittedKillClient + 10
1   IMGSGX543RC2GLDriver                0x30bbf5e5 SubmitPacketsIfAny + 245
2   GLEngine                            0x32f827db glFinish_Exec + 167
3   CoreImage                           0x31fb85b7 CI::GLESContext::recursive_render(CI::Node const*, CGRect, bool) + 219
4   CoreImage                           0x31fbb351 CI::GLESContext::render(CI::Node*,     CGRect) + 41
5   CoreImage                           0x31fc2901 CI::image_get_cgimage(CI::Context*, CI::Image*, CGRect, CGColorSpace*, CI::PixelFormat) + 1313
6   CoreImage                           0x31fa8427 -[CIContext createCGImage:fromRect:format:colorSpace:] + 487
7   CoreImage                           0x31fa81e9 -[CIContext createCGImage:fromRect:] + 89
8   App                                 0x0013c9db -[PZTiledImageLayer drawInContext:] (PZTiledImageLayer.m:129)
Run Code Online (Sandbox Code Playgroud)

这是由于应用程序处于后台(不允许)时访问GPU.

导致此崩溃的代码是:

if([UIApplication sharedApplication].applicationState == UIApplicationStateActive)
{
    cg_image = [self.imageContext createCGImage:im fromRect:rclip];
}
Run Code Online (Sandbox Code Playgroud)

这意味着应用程序在我检查后更改状态,但在GPU在Core Image …

core-image ios

5
推荐指数
1
解决办法
757
查看次数

标签 统计

core-image ×1

ios ×1