TianoCore EDK2 master
Loading...
Searching...
No Matches
DisplayUpdateProgressLibGraphics.c File Reference

Go to the source code of this file.

Macros

#define LOGO_BOTTOM_PADDING   20
 
#define PROGRESS_BLOCK_HEIGHT   10
 

Functions

VOID FindDim (VOID)
 
EFI_STATUS EFIAPI DisplayUpdateProgress (IN UINTN Completion, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION *Color OPTIONAL)
 

Variables

EFI_GRAPHICS_OUTPUT_PROTOCOLmGop = NULL
 
UINTN mPreviousProgress = 100
 
UINTN mStartX = 0
 
UINTN mStartY = 0
 
UINTN mBlockWidth = 0
 
UINTN mBlockHeight = 0
 
EFI_GRAPHICS_OUTPUT_BLT_PIXELmBlockBitmap
 
EFI_GRAPHICS_OUTPUT_BLT_PIXELmProgressBarBackground
 
const EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION mLogoDetectionColorMask
 
const EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION mProgressBarBackgroundColor
 
const EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION mProgressBarDefaultColor
 
BOOLEAN mGraphicsGood = FALSE
 

Detailed Description

Provides services to display completion progress of a firmware update on a graphical console that supports the Graphics Output Protocol.

Copyright (c) 2016, Microsoft Corporation. All rights reserved.
Copyright (c) 2018, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DisplayUpdateProgressLibGraphics.c.

Macro Definition Documentation

◆ LOGO_BOTTOM_PADDING

#define LOGO_BOTTOM_PADDING   20

Definition at line 26 of file DisplayUpdateProgressLibGraphics.c.

◆ PROGRESS_BLOCK_HEIGHT

#define PROGRESS_BLOCK_HEIGHT   10

Definition at line 27 of file DisplayUpdateProgressLibGraphics.c.

Function Documentation

◆ DisplayUpdateProgress()

EFI_STATUS EFIAPI DisplayUpdateProgress ( IN UINTN  Completion,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION *Color  OPTIONAL 
)

Function indicates the current completion progress of a firmware update. Platform may override with its own specific function.

Parameters
[in]CompletionA value between 0 and 100 indicating the current completion progress of a firmware update. This value must the the same or higher than previous calls to this service. The first call of 0 or a value of 0 after reaching a value of 100 resets the progress indicator to 0.
[in]ColorColor of the progress indicator. Only used when Completion is 0 to set the color of the progress indicator. If Color is NULL, then the default color is used.
Return values
EFI_SUCCESSProgress displayed successfully.
EFI_INVALID_PARAMETERCompletion is not in range 0..100.
EFI_INVALID_PARAMETERCompletion is less than Completion value from a previous call to this service.
EFI_NOT_READYThe device used to indicate progress is not available.

Definition at line 337 of file DisplayUpdateProgressLibGraphics.c.

◆ FindDim()

VOID FindDim ( VOID  )

Internal function used to find the bounds of the white logo (on black or red background).

These bounds are then computed to find the block size, 0%, 100%, etc.

Definition at line 112 of file DisplayUpdateProgressLibGraphics.c.

Variable Documentation

◆ mBlockBitmap

Definition at line 54 of file DisplayUpdateProgressLibGraphics.c.

◆ mBlockHeight

UINTN mBlockHeight = 0

Definition at line 49 of file DisplayUpdateProgressLibGraphics.c.

◆ mBlockWidth

UINTN mBlockWidth = 0

Definition at line 48 of file DisplayUpdateProgressLibGraphics.c.

◆ mGop

◆ mGraphicsGood

BOOLEAN mGraphicsGood = FALSE

Definition at line 102 of file DisplayUpdateProgressLibGraphics.c.

◆ mLogoDetectionColorMask

const EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION mLogoDetectionColorMask
Initial value:
= {
{
0xFF,
0xFF,
0x00,
0x00
}
}

Definition at line 65 of file DisplayUpdateProgressLibGraphics.c.

◆ mPreviousProgress

UINTN mPreviousProgress = 100

Definition at line 37 of file DisplayUpdateProgressLibGraphics.c.

◆ mProgressBarBackground

EFI_GRAPHICS_OUTPUT_BLT_PIXEL* mProgressBarBackground

Definition at line 59 of file DisplayUpdateProgressLibGraphics.c.

◆ mProgressBarBackgroundColor

const EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION mProgressBarBackgroundColor
Initial value:
= {
{
0x80,
0x80,
0x80,
0x00
}
}

Definition at line 77 of file DisplayUpdateProgressLibGraphics.c.

◆ mProgressBarDefaultColor

const EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION mProgressBarDefaultColor
Initial value:
= {
{
0xFF,
0xFF,
0xFF,
0x00
}
}

Definition at line 89 of file DisplayUpdateProgressLibGraphics.c.

◆ mStartX

UINTN mStartX = 0

Definition at line 42 of file DisplayUpdateProgressLibGraphics.c.

◆ mStartY

UINTN mStartY = 0

Definition at line 43 of file DisplayUpdateProgressLibGraphics.c.