OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcBlitLib.h
Go to the documentation of this file.
1
11#ifndef OC_BLIT_LIB
12#define OC_BLIT_LIB
13
14#include <Protocol/GraphicsOutput.h>
15#include <Library/BaseOverflowLib.h>
16
17//
18// Limit bytes per pixel to most common value for simplicity.
19//
20#define BYTES_PER_PIXEL sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
21STATIC_ASSERT (BYTES_PER_PIXEL == sizeof (UINT32), "Non 4-byte pixels are unsupported!");
22
23//
24// Read-only structure for the frame buffer configure.
25//
26typedef struct OC_BLIT_CONFIGURE {
28 UINT32 Width;
29 UINT32 Height;
32 UINT32 Rotation;
34 EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
35 EFI_PIXEL_BITMASK PixelMasks;
36 INT8 PixelShl[4]; // R-G-B-Rsvd
37 INT8 PixelShr[4]; // R-G-B-Rsvd
38 BASE_ALIGNAS (64) UINT8 LineBuffer[];
40
60RETURN_STATUS
61EFIAPI
63 IN VOID *FrameBuffer,
64 IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo,
65 IN UINT32 Rotation,
66 IN OUT OC_BLIT_CONFIGURE *Configure,
67 IN OUT UINTN *ConfigureSize
68 );
69
97RETURN_STATUS
98EFIAPI
100 IN OC_BLIT_CONFIGURE *Configure,
101 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
102 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
103 IN UINTN SourceX,
104 IN UINTN SourceY,
105 IN UINTN DestinationX,
106 IN UINTN DestinationY,
107 IN UINTN Width,
108 IN UINTN Height,
109 IN UINTN Delta
110 );
111
112#endif // OC_BLIT_LIB
STATIC_ASSERT(BYTES_PER_PIXEL==sizeof(UINT32), "Non 4-byte pixels are unsupported!")
RETURN_STATUS EFIAPI OcBlitRender(IN OC_BLIT_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)
Definition OcBlitLib.c:688
RETURN_STATUS EFIAPI OcBlitConfigure(IN VOID *FrameBuffer, IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo, IN UINT32 Rotation, IN OUT OC_BLIT_CONFIGURE *Configure, IN OUT UINTN *ConfigureSize)
Definition OcBlitLib.c:602
#define BYTES_PER_PIXEL
Definition OcBlitLib.h:20
UINT32 RotatedWidth
Definition OcBlitLib.h:30
UINT8 * FrameBuffer
Definition OcBlitLib.h:33
EFI_PIXEL_BITMASK PixelMasks
Definition OcBlitLib.h:35
UINT32 RotatedHeight
Definition OcBlitLib.h:31
BASE_ALIGNAS(64) UINT8 LineBuffer[]
UINT32 PixelsPerScanLine
Definition OcBlitLib.h:27
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat
Definition OcBlitLib.h:34