Pay for Hesitation: Performance Killer: Alpha and Blend Mode

Pages

2010年11月4日 星期四

Performance Killer: Alpha and Blend Mode

以下截錄自一個adobe 工程師的blog

http://www.kaourantin.net/2005/09/some-word-on-blend-modes-in-flash.html

Some word on blend modes in Flash Player 8

Blend modes is one of those features who were long thought impossible to do in the Flash Player. And to be frank, it was indeed the most difficult feature I worked on during this release. Something to understand here is that blend modes are not implemented through the bitmap caching feature like the filters, but it's actually part of the core vector renderer. The two main advantages here are that using blend modes will not use excessive amounts of memory and use the shortest path possible in the rendering pipeline making it acceptable speed wise.

Nevertheless there are some things which need to be understood about this feature. It has limitations performance wise. In fact anytime you use a blend mode, all of the vector content in a particular region of your movie will be handled as it was partially transparent. And as you might know using transparent vectors can be a bit slow if used too graciously. Experiment and see where they are useful, but do not overuse them. Sometimes precompositing or using bitmap caching might help.




以下轉自adobe 官方論壇

Alpha blending

http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36c11f3d612431904db9-7ffe.html

Avoid using effects that require alpha blending when using the alpha property, such as fading effects. Keep in mind that alpha blending is processor-intensive for Flash Player and can hurt performance on slow devices.. Avoid using the alpha property, when possible.

沒有留言: