Skip to content

Conversation

HadrienG2
Copy link
Contributor

@HadrienG2 HadrienG2 commented Sep 26, 2018

This MR tries to improve the usability and safety of the Graphics Output Protocol by...

  • Bringing documentation in sync with the UEFI spec's level of detail.
  • Adding memory safety checks to the Blt function (if it is safe, it is not allowed to do buffer overflows)
    • We can later extract an unsafe back-end if that turns out to be a perf bottleneck for someone.
  • Clarifying in which circumstances a BltBuffer stride must and mustn't be specified using an enum.
  • Panicking if the framebuffer is accessed in a Blt-only mode
    • While this function is unsafe, I think the check is cheap enough (framebuffer is normally acquired once and used many times) and the error easy enough to make.
  • Hiding the reserved byte of BltPixels (allowing the user to modify it is a type-safety risk).
  • Homogeneizing the wording style of the data structure docs.

Copy link
Collaborator

@GabrielMajeri GabrielMajeri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This PR reminded me to open #50

@GabrielMajeri GabrielMajeri merged commit 1ce8da3 into master Sep 26, 2018
@HadrienG2 HadrienG2 deleted the gop-cleanup branch September 27, 2018 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants