0

Say I have two non-opaque images of the same size and format on the same background view, one with only four corners being transparent, and the other with four corners and a center hole being transparent. Will there be any rendering performance differences when doing color blending for these two images and the background view?

More generally, if a image is non-opaque — so color blending will happen whether it is wholly transparent or only partially transparent — does the number of transparent areas and the sizes of these areas matter in the blending performance?

4

1 回答 1

1

嗯,是的......会有性能差异。在这种情况下的问题是它是否足够大让您注意到?可能不是。每当您有一个不透明的图像时,渲染引擎必须计算每个像素的颜色来渲染该图像下方的图层。您拥有的非透明像素越多,此计算需要进行的次数就越多。然而,iOS 在单精度浮点计算方面非常快(从 armv7 架构开始),因此除非您将大量图像分层,否则您不太可能注意到差异。

于 2012-04-15T04:52:37.003 回答