Giter Club home page Giter Club logo

Comments (5)

cryptoAlgorithm avatar cryptoAlgorithm commented on September 17, 2024 1

Ok, I fixed this in my fork. It was quite a simple issue, the refresh rates are hardcoded and assumed a max of 60FPS, but the 2021 MBPs and iPad Pros have a 120Hz screen.

from swiftygif.

frank137 avatar frank137 commented on September 17, 2024

Reverting to version 5.4.0 fixed my specific issue.
So I will keep using 5.4.0 for now.

from swiftygif.

cryptoAlgorithm avatar cryptoAlgorithm commented on September 17, 2024

macOS app running on macOS 13, M1 Pro. Same issue, GIFs rendering much faster than they should. I'll see if reverting fixes it.

from swiftygif.

cryptoAlgorithm avatar cryptoAlgorithm commented on September 17, 2024

No luck, after reverting to 5.4.0, cleaning build folder and rebuilding, the issue still persists. For more context, this is a SwiftUI app, but using a very similar snippet of code to instantiate SwiftyGIF.

from swiftygif.

donmai-me avatar donmai-me commented on September 17, 2024

This might be a regression caused by #165 when fixing #164. I had a quick look and can send a quick fix which solved the problem on my M1 iPad pro. But I found another problem at line 225 in UIImage+SwiftyGif

let maximumFramesPerSecond = UIScreen.main.maximumFramesPerSecond

This is problematic since this is 120 even when a high refresh rate device is in low power mode or when the system decides to throttle the framerate of the display. CADisplayLink and CVDisplayLink should be used to get the current refresh rate, however, this requires some refactoring as the code seems to assume the device is running at a fixed frame rate. More info here https://developer.apple.com/videos/play/wwdc2021/10147/

I'll send a quick fix to address OP's problem but this is a band aid solution to the problem. If there's interest in using display links, I can help. Cheers!

from swiftygif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.