Skip to content

Pixel struct makes it hard to render directly into the surface buffer #358

Description

@nicoburns

Rendering libraries (such as vello_cpu or tiny-skia) don't know about the Pixel type and expect to be able to render into &mut [u8]. Thus the current API design with Pixel makes it difficult to render directly into the softbuffer buffer (although it is possible with an unsafe cast).

I think that softbuffer ought to encapsulate the unsafe and provide methods for safely accessing the surface buffer and &mut [u8].

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions