Java 2D 图形性能问题
1)当制作具有位掩码透明度的新图像,在其上绘制一些东西然后将其绘制在另一个图像之上时,它们是否有任何性能损失?与在相同条件下绘制相同图像,但将背景清除为不透明颜色?
2)绘制多个图像与绘制一张包含所有图像的大图像相比,性能损失的重要性是什么?
3)从大图像(精灵表)或单个图像中绘制小图像哪个更好?注意我说的是内存图像,它们在磁盘上的表示并不重要。
1) Is their any performance loss when making a new image with bitmask transparency, drawing just a few things on it then drawing it on top of another; versus drawing the same image in the same conditions, but with the background cleared to an opaque color ?
2) What is the importance of the performance loss when drawing multiple images versus drawing one big image that includes them all ?
3) Is it better to draw small bit of images from a big image (a sprite sheet) or from their individual image ? Note I'm speaking about memory images, their representation on disk doesn't matter.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里有很多未知参数:
回答您的问题的唯一实用方法是运行基准测试。
There are a lot of unknown parameters here:
The only practical way to answer your questions is to run benchmarks.