[英]Android Porter-Duff Compositing Performance
I have been unable to find any internet articles or Google documentation on the relative performance of compositing bitmaps using different Porter-Duff modes. 我无法找到任何关于使用不同Porter-Duff模式合成位图的相对性能的互联网文章或Google文档。 What has become very apparent to me whilst programming is that the traditional SRC/DST prefix modes are performing a lot faster (3 - 4 times faster) than the Android Mode.DARKEN, Mode.LIGHTEN, Mode.MULTIPLY modes. 在编程时,对我来说非常明显的是传统的SRC / DST前缀模式比Android Mode.DARKEN,Mode.LIGHTEN,Mode.MULTIPLY模式执行得快得多(快3-4倍)。 Use of the latter modes can bring down my game engine's performance from 40+ to around 13 FPS when rendering a lighting mask on a 720p screen. 在720p屏幕上渲染光源模板时,使用后一种模式可以将我的游戏引擎性能从40+降低到大约13 FPS。
My questions are thus: 我的问题是这样的:
Yes, there are many faster ways, for a game engine switching to opengl (or to something like Unity if you want something more high level) can be a very good idea. 是的,有一些更快的方法,一个游戏引擎切换到opengl(或者如果你想要更高级别的东西,可以是一个非常好的主意)。 Renderscript is also a very good alternative that already has built-in multiply intrinsic. Renderscript也是一个非常好的替代品,已经内置了乘法内在函数。
You should probably bench these things yourself, there are few measurements on this kind of topic and hardware moves fast. 您可能应该自己处理这些问题,对此类主题的测量很少,而且硬件移动速度很快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.