当 wmode 嵌入参数设置为“gpu”时,哪些 Flash 渲染速度更快?
2008 年 5 月(大约三年前,截至本文发布时),一位从事 Flash Player 10 工作的工程师在 一篇讨论 GPU 合成的博客文章:
仅仅因为 Flash Player 使用 [GPU 合成] 并不意味着它会更快。在大多数情况下,您的内容会变得更慢...内容必须经过专门设计才能与 GPU 功能良好配合。 Flash Player 中的软件光栅化器可以优化 GPU 无法优化的许多情况,作为设计人员,您必须了解 GPU 的功能并相应地调整您的内容。我意识到,除非我们能够提供指导,否则这种说法毫无用处,而我们希望在不久的将来能够实现这一目标。
有谁知道 Adobe 在接下来的三年中提供了任何此类指导吗?我能找到的唯一相关信息是这篇文章,它提供了优化针对硬件渲染的提示,但不针对硬件加速合成,这是“gpu”wmode嵌入参数打开的。
如果无法单独测试每个内容,我如何确定我的内容何时会受益于 GPU 合成的使用以及何时使用 GPU 合成会带来损害?
提前致谢!
In May 2008 (about three years ago, as of the time of this posting), an engineer who worked on Flash Player 10 wrote the following in a blog post talking about GPU compositing:
Just because the Flash Player is using [GPU compositing] does not mean it will be faster. In the majority of cases your content will become slower... Content has to be specifically designed to work well with GPU functionality. The software rasterizer in the Flash Player can optimize a lot of cases the GPU cannot optimize, you as the designer will have to be aware of what a GPU does and adapt your content accordingly. I realize this statement is useless unless we can provide guidance, something we can hopefully achieve in the not to distant future.
Is anyone aware of any such guidance having been provided by Adobe in the succeeding three years? The only relevant information I could find was in this article, which provides optimization tips for hardware rendering, but not for hardware-accelerated compositing, which is what the "gpu" wmode embed param turns on.
Short of testing each piece of content individually, how can I determine when my content would benefit from the use of GPU compositing and when the use of GPU compositing would be a detriment?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您提供的链接包含大量有关如何设置内容以与 GPU 渲染良好配合的信息(事实上,当 wmode 设置为时,Flash Player 10.1 及更高版本将执行此操作)图形处理器)。这包括合成,以及一些其他功能。
本质上,合成意味着通过组合和/或分层位图来组装屏幕图像。因此,您可以放心地假设,当使用带有少量基于矢量的内容的 GPU 渲染模式或使用 cacheAsBitmap 时,性能将会提高。
除了与向量相关的事情之外,大多数适用于 10.1 播放器的优化方法也应该适用于早期版本。
然而,我认为没有一套明确的规则来定义哪些优化方法最好,哪些最终会降低性能。您始终必须测试和验证您对速度更快的任何假设,尤其是在部署到不同的硬件平台时。
The link you provided contains a lot of information on how to set up your content to work well with gpu rendering (which is, in fact, what Flash Player 10.1 and higher will do, when wmode is set to gpu). This includes compositing, and also some other functionalities.
In essence, compositing means assembling a screen image from combining and/or layering bitmaps. So you can safely assume that performance will increase when using the gpu render mode with little vector-based content, or when cacheAsBitmap is used.
Apart from vector-related things, most of the optimization methods that work for the 10.1 player should work for earlier versions, as well.
However, I would assume that there is no definitive set of rules to define which optimization methods are best and which will ultimately degrade performance. You will always have to test and verify any assumptions you make about what is going to be faster, especially when deploying to different hardware platforms.