开发者

actionscript image vs skin performance

Using FP 10.1, and undecide which is more efficiency if I implement a skin button with FXG con开发者_JAVA技巧tain gradient, bevelfilter, stroke for up and down state VS two state of images.

Which one would use less CPU? When do I use cacheasbitmap?


Images would use less CPU, but use more memory.

Vector would use more CPU, but use less memory (although this is neglected if you're using filters / cacheAsBitmap). The biggest advantage of using vectors is the ability to change the content in real time though.

cacheAsBitmap would help when you have complex vectors and they're not being changed & you have something being re-rendered on top of them.

However, for a simple button, I'd say it's irrelevant - go with whatever kind of asset is easier for you to maintain. Unless you have hundreds (if not thousands) of buttons on screen at the same time, and you have some very complex rendering forcing them to be redrawn continuously, trying to optimize CPU and memory management to that level is spending too much time where it matters too little.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜