如何在CPU上同时运行Core Animation和Core Image? [英] How do you run Core Animation and Core Image together on the CPU?

查看:114
本文介绍了如何在CPU上同时运行Core Animation和Core Image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apple的Core Image编程指南,位于 获得最佳性能

Apple's Core Image Programming Guide, under the section "Getting the Best Performance" says


在使用GPU上下文渲染CIImage对象时,避免使用Core Animation动画。

Avoid Core Animation animations while rendering CIImage objects with a GPU context.

如果需要同时使用两者,您可以将两者都设置为使用CPU。

If you need to use both simultaneously, you can set up both to use the CPU.

有人可以解释此语句吗?为什么在CPU上同时运行Core Animation和Core Image会比使用GPU更有效?

Can anyone explain this statement? Why it would be more efficient to run Core Animation and Core Image together on the CPU, rather than using the GPU?

如何设置Core Animation在CPU上运行?

How do you set up Core Animation to run on the CPU?

推荐答案

我遇到了同样的问题,遇到了WWDC 2013会议509注释, http://asciiwwdc.com/2013/sessions/509

I had the same question and came across this WWDC 2013 session 509 comment, http://asciiwwdc.com/2013/sessions/509 :

请注意,Core Animation和Core Image都充分利用了GPU。

"And also be aware that both Core Animation and Core Image both make extensive use of the GPU.

因此,如果您希望Core Animations变得流畅,则可以错开Core Image操作或使用CPU CIContext,以便它们不会同时对GPU施加压力。

So if you want your Core Animations to be smooth, you want to either stagger your Core Image operations or use a CPU CIContext so that they don't put pressure on the GPU at the same time."

这篇关于如何在CPU上同时运行Core Animation和Core Image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆