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

Go to the source code of this file.

Data Structures

struct  FRAME_BUFFER_CONFIGURE
 

Functions

VOID FrameBufferBltLibConfigurePixelFormat (IN CONST EFI_PIXEL_BITMASK *BitMask, OUT UINT32 *BytesPerPixel, OUT INT8 *PixelShl, OUT INT8 *PixelShr)
 
RETURN_STATUS EFIAPI FrameBufferBltConfigure (IN VOID *FrameBuffer, IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo, IN OUT FRAME_BUFFER_CONFIGURE *Configure, IN OUT UINTN *ConfigureSize)
 
EFI_STATUS FrameBufferBltLibVideoFill (IN FRAME_BUFFER_CONFIGURE *Configure, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Color, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height)
 
RETURN_STATUS FrameBufferBltLibVideoToBltBuffer (IN FRAME_BUFFER_CONFIGURE *Configure, OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta)
 
RETURN_STATUS FrameBufferBltLibBufferToVideo (IN FRAME_BUFFER_CONFIGURE *Configure, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta)
 
RETURN_STATUS FrameBufferBltLibVideoToVideo (IN FRAME_BUFFER_CONFIGURE *Configure, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height)
 
RETURN_STATUS EFIAPI FrameBufferBlt (IN FRAME_BUFFER_CONFIGURE *Configure, IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta)
 

Variables

CONST EFI_PIXEL_BITMASK mRgbPixelMasks
 
CONST EFI_PIXEL_BITMASK mBgrPixelMasks
 

Detailed Description

FrameBufferBltLib - Library to perform blt operations on a frame buffer.

Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FrameBufferBltLib.c.

Function Documentation

◆ FrameBufferBlt()

RETURN_STATUS EFIAPI FrameBufferBlt ( IN FRAME_BUFFER_CONFIGURE Configure,
IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer  OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION  BltOperation,
IN UINTN  SourceX,
IN UINTN  SourceY,
IN UINTN  DestinationX,
IN UINTN  DestinationY,
IN UINTN  Width,
IN UINTN  Height,
IN UINTN  Delta 
)

Performs a UEFI Graphics Output Protocol Blt operation.

Parameters
[in]ConfigurePointer to a configuration which was successfully created by FrameBufferBltConfigure ().
[in,out]BltBufferThe data to transfer to screen.
[in]BltOperationThe operation to perform.
[in]SourceXThe X coordinate of the source for BltOperation.
[in]SourceYThe Y coordinate of the source for BltOperation.
[in]DestinationXThe X coordinate of the destination for BltOperation.
[in]DestinationYThe Y coordinate of the destination for BltOperation.
[in]WidthThe width of a rectangle in the blt rectangle in pixels.
[in]HeightThe height of a rectangle in the blt rectangle in pixels.
[in]DeltaNot used for EfiBltVideoFill and EfiBltVideoToVideo operation. If a Delta of 0 is used, the entire BltBuffer will be operated on. If a subrectangle of the BltBuffer is used, then Delta represents the number of bytes in a row of the BltBuffer.
Return values
RETURN_INVALID_PARAMETERInvalid parameter were passed in.
RETURN_SUCCESSThe Blt operation was performed successfully.

Definition at line 670 of file FrameBufferBltLib.c.

◆ FrameBufferBltConfigure()

RETURN_STATUS EFIAPI FrameBufferBltConfigure ( IN VOID *  FrameBuffer,
IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION FrameBufferInfo,
IN OUT FRAME_BUFFER_CONFIGURE Configure,
IN OUT UINTN ConfigureSize 
)

Create the configuration for a video frame buffer.

The configuration is returned in the caller provided buffer.

Parameters
[in]FrameBufferPointer to the start of the frame buffer.
[in]FrameBufferInfoDescribes the frame buffer characteristics.
[in,out]ConfigureThe created configuration information.
[in,out]ConfigureSizeSize of the configuration information.
Return values
RETURN_SUCCESSThe configuration was successful created.
RETURN_BUFFER_TOO_SMALLThe Configure is to too small. The required size is returned in ConfigureSize.
RETURN_UNSUPPORTEDThe requested mode is not supported by this implementaion.

Definition at line 111 of file FrameBufferBltLib.c.

◆ FrameBufferBltLibBufferToVideo()

RETURN_STATUS FrameBufferBltLibBufferToVideo ( IN FRAME_BUFFER_CONFIGURE Configure,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL BltBuffer,
IN UINTN  SourceX,
IN UINTN  SourceY,
IN UINTN  DestinationX,
IN UINTN  DestinationY,
IN UINTN  Width,
IN UINTN  Height,
IN UINTN  Delta 
)

Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation with extended parameters.

Parameters
[in]ConfigurePointer to a configuration which was successfully created by FrameBufferBltConfigure ().
[in]BltBufferOutput buffer for pixel color data.
[in]SourceXX location within BltBuffer.
[in]SourceYY location within BltBuffer.
[in]DestinationXX location within video.
[in]DestinationYY location within video.
[in]WidthWidth (in pixels).
[in]HeightHeight.
[in]DeltaNumber of bytes in a row of BltBuffer.
Return values
RETURN_INVALID_PARAMETERInvalid parameter were passed in.
RETURN_SUCCESSThe Blt operation was performed successfully.

Definition at line 469 of file FrameBufferBltLib.c.

◆ FrameBufferBltLibConfigurePixelFormat()

VOID FrameBufferBltLibConfigurePixelFormat ( IN CONST EFI_PIXEL_BITMASK BitMask,
OUT UINT32 *  BytesPerPixel,
OUT INT8 *  PixelShl,
OUT INT8 *  PixelShr 
)

Initialize the bit mask in frame buffer configure.

Parameters
BitMaskThe bit mask of pixel.
BytesPerPixelSize in bytes of pixel.
PixelShlLeft shift array.
PixelShrRight shift array.

Definition at line 47 of file FrameBufferBltLib.c.

◆ FrameBufferBltLibVideoFill()

EFI_STATUS FrameBufferBltLibVideoFill ( IN FRAME_BUFFER_CONFIGURE Configure,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Color,
IN UINTN  DestinationX,
IN UINTN  DestinationY,
IN UINTN  Width,
IN UINTN  Height 
)

Performs a UEFI Graphics Output Protocol Blt Video Fill.

Parameters
[in]ConfigurePointer to a configuration which was successfully created by FrameBufferBltConfigure ().
[in]ColorColor to fill the region with.
[in]DestinationXX location to start fill operation.
[in]DestinationYY location to start fill operation.
[in]WidthWidth (in pixels) to fill.
[in]HeightHeight to fill.
Return values
RETURN_INVALID_PARAMETERInvalid parameter was passed in.
RETURN_SUCCESSThe video was filled successfully.

Definition at line 196 of file FrameBufferBltLib.c.

◆ FrameBufferBltLibVideoToBltBuffer()

RETURN_STATUS FrameBufferBltLibVideoToBltBuffer ( IN FRAME_BUFFER_CONFIGURE Configure,
OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL BltBuffer,
IN UINTN  SourceX,
IN UINTN  SourceY,
IN UINTN  DestinationX,
IN UINTN  DestinationY,
IN UINTN  Width,
IN UINTN  Height,
IN UINTN  Delta 
)

Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation with extended parameters.

Parameters
[in]ConfigurePointer to a configuration which was successfully created by FrameBufferBltConfigure ().
[out]BltBufferOutput buffer for pixel color data.
[in]SourceXX location within video.
[in]SourceYY location within video.
[in]DestinationXX location within BltBuffer.
[in]DestinationYY location within BltBuffer.
[in]WidthWidth (in pixels).
[in]HeightHeight.
[in]DeltaNumber of bytes in a row of BltBuffer.
Return values
RETURN_INVALID_PARAMETERInvalid parameter were passed in.
RETURN_SUCCESSThe Blt operation was performed successfully.

Definition at line 361 of file FrameBufferBltLib.c.

◆ FrameBufferBltLibVideoToVideo()

RETURN_STATUS FrameBufferBltLibVideoToVideo ( IN FRAME_BUFFER_CONFIGURE Configure,
IN UINTN  SourceX,
IN UINTN  SourceY,
IN UINTN  DestinationX,
IN UINTN  DestinationY,
IN UINTN  Width,
IN UINTN  Height 
)

Performs a UEFI Graphics Output Protocol Blt Video to Video operation

Parameters
[in]ConfigurePointer to a configuration which was successfully created by FrameBufferBltConfigure ().
[in]SourceXX location within video.
[in]SourceYY location within video.
[in]DestinationXX location within video.
[in]DestinationYY location within video.
[in]WidthWidth (in pixels).
[in]HeightHeight.
Return values
RETURN_INVALID_PARAMETERInvalid parameter were passed in.
RETURN_SUCCESSThe Blt operation was performed successfully.

Definition at line 572 of file FrameBufferBltLib.c.

Variable Documentation

◆ mBgrPixelMasks

CONST EFI_PIXEL_BITMASK mBgrPixelMasks
Initial value:
= {
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
}

Definition at line 34 of file FrameBufferBltLib.c.

◆ mRgbPixelMasks

CONST EFI_PIXEL_BITMASK mRgbPixelMasks
Initial value:
= {
0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000
}

Definition at line 30 of file FrameBufferBltLib.c.