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

fix jitter behaviour of skia due to double buffers swapping #446

Merged
merged 7 commits into from
Nov 17, 2023

Conversation

tushar5526
Copy link
Member

@tushar5526 tushar5526 commented Nov 16, 2023

Realted to #424 #425

The jittery behaviour and errors with skia were due to wrong rendering logic. GLFW uses a double buffer swapping technique to render graphics and our logic was only running the new commands and the previous state was getting lost after buffer swaps.

Currently did a hacky solution to fix it for now (tested on MacOS)

  • We are currently storing the state of surface in an image before flushing and swapping the buffers. The state is then restored before the start of the next frame.
  • Another solution would be to mimic all the path in Canvas, which I don't think is easy to do with the current code structure.

TODO: to switch to using bitmap or pixmap to store state

This PR also fixes the errors of wrong mouse position in retina displays on MAC.

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.

1 participant