Closed Alex601t closed 6 years ago
Hi @Alex601t ,thanks for you contribution 👍
I noticed that you change the function decodeImage
, and I think that isn't a good idea.
I've tried your version, but it seems that the image can't be decoded in asynchronously that way.
You can use the measurement tools in Xcode to verify this.
As you can see in the benchmark that I ran them before, if the image is decoded asynchronously.
The CPU usage of main thread will be very low. But I can't see the same result if I use your version.
@wangjwchn ohhh noo... I have missed one case: in old implementation we set next frame to the layer's contents:self.layer.contents = self.nextFrame?.cgImage
, in this PR we are setting layer and image and as a result we are setting image context twice.
I will close this PR and create a new one later.
Hey! I like this solution for rendering gifs, but I can't use it in UITable- or CollectionView. Reasons:
File changes: