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

WIP: macos: Copy to IOSurface on present #96

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Commits on Apr 10, 2023

  1. WIP: Attempt to use IOSurface on macOS

    It looks like `BytesPerRow` (the stride) has some kind of alignment requirement (testing on M1), that doesn't let us just use the width. So for this to work, softbuffer needs to expose the stride, and the user needs to deal with that...
    
    This doesn't seem to be showing the right thing even when width matches stride. Not sure why.
    ids1024 committed Apr 10, 2023
    Configuration menu
    Copy the full SHA
    0fa3b54 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. Configuration menu
    Copy the full SHA
    8c1ee39 View commit details
    Browse the repository at this point in the history
  2. Copy to IOSurface

    ids1024 committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    095dba8 View commit details
    Browse the repository at this point in the history
  3. fix

    ids1024 committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    446e8ec View commit details
    Browse the repository at this point in the history
  4. examples: Avoid dividing index to get x, y; calculate index from x, y

    Division is more expensive than multiplication, and this doesn't seem to
    be optimize away, so iterating over `(0..height)` and `(0..width)`
    provides better performance.
    
    It's good to have the example show the best way to write code using
    softbuffer, and this helps when using examples as a benchmark. This will
    also be needed if Softbuffer supports formats where `stride` isn't just
    `width * pixel_size`, and needs alignment.
    ids1024 committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    edc5c76 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a2f36d9 View commit details
    Browse the repository at this point in the history