Skip to content

Commit

Permalink
OcBootManagementLib: Remove clear screen work-around no longer requir…
Browse files Browse the repository at this point in the history
…ed after 17d64aa
  • Loading branch information
mikebeaton committed Feb 16, 2023
1 parent 607fbd2 commit d103f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 48 deletions.
45 changes: 0 additions & 45 deletions Library/OcBootManagementLib/OcBootManagementLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,50 +165,6 @@ InternalRunRequestPrivilege (
return Status;
}

//
// Since the Apple picker is GOP-based, it is reasonable to use specifically GOP to clear up after it.
// Note that depending on settings, resetting ConsoleControl to text mode followed by ConOut->ClearScreen,
// within the builtin picker, is not always sufficient to display it after the Apple picker, with no left-
// over Apple picker baggage on screen, so we add this.
//
STATIC
EFI_STATUS
GopClearScreen (
VOID
)
{
EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Pixel;

Status = gBS->HandleProtocol (
gST->ConsoleOutHandle,
&gEfiGraphicsOutputProtocolGuid,
(VOID **)&Gop
);

if (EFI_ERROR (Status)) {
return Status;
}

Pixel.Raw = 0x0;

Gop->Blt (
Gop,
&Pixel.Pixel,
EfiBltVideoFill,
0,
0,
0,
0,
Gop->Mode->Info->HorizontalResolution,
Gop->Mode->Info->VerticalResolution,
0
);

return EFI_UNSUPPORTED;
}

EFI_STATUS
OcRunBootPicker (
IN OC_PICKER_CONTEXT *Context
Expand Down Expand Up @@ -311,7 +267,6 @@ OcRunBootPicker (
if (IsApplePickerSelection) {
DEBUG ((DEBUG_WARN, "OCB: Apple Picker returned no entry valid under OC, falling back to builtin\n"));
Context->PickerMode = OcPickerModeBuiltin;
GopClearScreen ();
} else {
DEBUG ((DEBUG_INFO, "OCB: System has no boot entries, showing picker with auxiliary\n"));
}
Expand Down
7 changes: 4 additions & 3 deletions Platform/OpenCanopy/OcBootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@ OcShowMenuByOc (
ASSERT (mGuiContext.BootEntry != NULL || mGuiContext.Refresh);

//
// Do not use this clear screen, since the convention (not just in Apple firmware) seems to be
// for each UI step which finishes to leave its own graphics up for the next step to clear, so
// this matches that, and gives a slightly smoother looking, slightly faster boot.
// Do not use this clear screen, since the convention (in Apple native picker, but also other
// parts of other pre-boot UI) seems to be for each UI step which finishes to leave its own
// graphics up for the next step to clear; this matches that, and gives a slightly smoother,
// slightly faster UI experience.
//
#if 0
if (!mGuiContext.Refresh) {
Expand Down

0 comments on commit d103f4e

Please sign in to comment.