Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop setting frameInterval for animated image optimization #1607

Merged

Conversation

raycsh017
Copy link
Contributor

We previously tried to optimize showing animated images (e.g. GIF) by calling
display link for updating the frame just when when we need the next frame, but
this resulted in some frames dropping when frameInterval wasn't respected like
you can find from this GIF:
https://i.pinimg.com/originals/58/9c/e8/589ce828d2ef0797da0e85b1c6d2f2b3.gif

Since the the display link fire method continues if we detect we're
at the same image index as before, let's just remove this optimization.

We previously tried to optimize showing animated images (e.g. GIF) by calling
display link for updating the frame just when when we need the next frame, but
this resulted in some frames dropping when `frameInterval` wasn't respected like
you can find from this GIF:
https://i.pinimg.com/originals/58/9c/e8/589ce828d2ef0797da0e85b1c6d2f2b3.gif

Since the the display link fire method continues if we detect we're
at the same image index as before, let's just remove this optimization.
Copy link
Member

@garrettmoon garrettmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I defer to Garrett on this one. Let's get it in.

@nguyenhuy nguyenhuy merged commit ecd0ef7 into TextureGroup:master Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants