Skip to content

Optimize skia rendering loop #455

Description

@tushar5526

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions