开发者

Do graphic operations off-screen incur a processing overhead?

开发者 https://www.devze.com 2023-01-15 11:49 出处:网络
I\'m trying to optimise some graphical routines for an app, and I\'d like to know if off-screen animations (eg, [object startAnimating]) or just plain moving of a UIImageView by setting its rect (off-

I'm trying to optimise some graphical routines for an app, and I'd like to know if off-screen animations (eg, [object startAnimating]) or just plain moving of a UIImageView by setting its rect (off-screen), have any processor overhead, 开发者_开发知识库or are they somehow ignored when off-screen?

Many thanks for any help.


(1) If it involves changing pixels on the screen, there is overhead.

(2) If it involves doing something off screen that'll eventually be on screen, there is overhead.

(3) If it involves doing something that'll never be on screen, why are you doing it in the first place?

That last one, though, is very slightly snarky. Sometimes, you do need to maintain relatively visual state in a fashion that you can then retrieve information from, even though it isn't visual. Pretty few and far between, though. Without knowing more about your situation, hard to say.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号