Skip to content

Clean up framebuffer abstraction #64

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

Merged
merged 4 commits into from
Oct 14, 2018
Merged

Clean up framebuffer abstraction #64

merged 4 commits into from
Oct 14, 2018

Conversation

HadrienG2
Copy link
Contributor

As previously promised, this PR provides a higher-level way to use the GOP's framebuffer that is more ergonomic than raw pointers (though still unsafe, due to pixel format requirements).

Compared to the pointer-based access method, which remains available, the new methods...

  • Provide easy access to volatile reads and writes
  • Prevent use of a stale framebuffer pointer after a mode switch
  • Perform bounds checking in debug mode

As compilers can be (rightfully) conservative about multi-byte volatile reads and writes, an interface to easily perform these is provided.

@HadrienG2 HadrienG2 merged commit 5e95f52 into master Oct 14, 2018
@HadrienG2 HadrienG2 deleted the framebuffer branch October 14, 2018 12:35
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