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

Optimize skia rendering loop #455

Open
tushar5526 opened this issue Nov 23, 2023 · 0 comments
Open

Optimize skia rendering loop #455

tushar5526 opened this issue Nov 23, 2023 · 0 comments

Comments

@tushar5526
Copy link
Member

tushar5526 commented Nov 23, 2023

Describe the bug
glfw uses double buffers while rendering graphics, which means re-drawing the frame from scratch every time. The problem is that we don't have/store the commands previously executed in draw, setup or event_handlers. We get the new command from draw to execute on each new frame.

The current hacky fix was to, take a snapshot of the frontbuffer - draw the new commands on top of it and then switch buffers. We repeat this process every frame.

This issue deals with exploring ways, how to make this work more efficiently.

Refer to this section in code: https://github.com/p5py/p5/blob/master/p5/sketch/Skia2DRenderer/base.py#L127-L131

@tushar5526 tushar5526 changed the title Optimise skia rendering loop Optimize skia rendering loop Dec 4, 2023
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

No branches or pull requests

1 participant