1 | /** @file
|
---|
2 | Library for performing UEFI GOP Blt operations on a framebuffer
|
---|
3 |
|
---|
4 | Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef __FRAMEBUFFER_BLT_LIB__
|
---|
11 | #define __FRAMEBUFFER_BLT_LIB__
|
---|
12 |
|
---|
13 | #include <Protocol/GraphicsOutput.h>
|
---|
14 |
|
---|
15 | //
|
---|
16 | // Opaque structure for the frame buffer configure.
|
---|
17 | //
|
---|
18 | typedef struct FRAME_BUFFER_CONFIGURE FRAME_BUFFER_CONFIGURE;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | Create the configuration for a video frame buffer.
|
---|
22 |
|
---|
23 | The configuration is returned in the caller provided buffer.
|
---|
24 |
|
---|
25 | @param[in] FrameBuffer Pointer to the start of the frame buffer.
|
---|
26 | @param[in] FrameBufferInfo Describes the frame buffer characteristics.
|
---|
27 | @param[in,out] Configure The created configuration information.
|
---|
28 | @param[in,out] ConfigureSize Size of the configuration information.
|
---|
29 |
|
---|
30 | @retval RETURN_SUCCESS The configuration was successful created.
|
---|
31 | @retval RETURN_BUFFER_TOO_SMALL The Configure is to too small. The required
|
---|
32 | size is returned in ConfigureSize.
|
---|
33 | @retval RETURN_UNSUPPORTED The requested mode is not supported by
|
---|
34 | this implementaion.
|
---|
35 | **/
|
---|
36 | RETURN_STATUS
|
---|
37 | EFIAPI
|
---|
38 | FrameBufferBltConfigure (
|
---|
39 | IN VOID *FrameBuffer,
|
---|
40 | IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo,
|
---|
41 | IN OUT FRAME_BUFFER_CONFIGURE *Configure,
|
---|
42 | IN OUT UINTN *ConfigureSize
|
---|
43 | );
|
---|
44 |
|
---|
45 | /**
|
---|
46 | Performs a UEFI Graphics Output Protocol Blt operation.
|
---|
47 |
|
---|
48 | @param[in] Configure Pointer to a configuration which was successfully
|
---|
49 | created by FrameBufferBltConfigure ().
|
---|
50 | @param[in,out] BltBuffer The data to transfer to screen.
|
---|
51 | @param[in] BltOperation The operation to perform.
|
---|
52 | @param[in] SourceX The X coordinate of the source for BltOperation.
|
---|
53 | @param[in] SourceY The Y coordinate of the source for BltOperation.
|
---|
54 | @param[in] DestinationX The X coordinate of the destination for
|
---|
55 | BltOperation.
|
---|
56 | @param[in] DestinationY The Y coordinate of the destination for
|
---|
57 | BltOperation.
|
---|
58 | @param[in] Width The width of a rectangle in the blt rectangle
|
---|
59 | in pixels.
|
---|
60 | @param[in] Height The height of a rectangle in the blt rectangle
|
---|
61 | in pixels.
|
---|
62 | @param[in] Delta Not used for EfiBltVideoFill and
|
---|
63 | EfiBltVideoToVideo operation. If a Delta of 0
|
---|
64 | is used, the entire BltBuffer will be operated
|
---|
65 | on. If a subrectangle of the BltBuffer is
|
---|
66 | used, then Delta represents the number of
|
---|
67 | bytes in a row of the BltBuffer.
|
---|
68 |
|
---|
69 | @retval RETURN_INVALID_PARAMETER Invalid parameter were passed in.
|
---|
70 | @retval RETURN_SUCCESS The Blt operation was performed successfully.
|
---|
71 | **/
|
---|
72 | RETURN_STATUS
|
---|
73 | EFIAPI
|
---|
74 | FrameBufferBlt (
|
---|
75 | IN FRAME_BUFFER_CONFIGURE *Configure,
|
---|
76 | IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
|
---|
77 | IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
---|
78 | IN UINTN SourceX,
|
---|
79 | IN UINTN SourceY,
|
---|
80 | IN UINTN DestinationX,
|
---|
81 | IN UINTN DestinationY,
|
---|
82 | IN UINTN Width,
|
---|
83 | IN UINTN Height,
|
---|
84 | IN UINTN Delta
|
---|
85 | );
|
---|
86 |
|
---|
87 | #endif
|
---|