]> git.proxmox.com Git - mirror_edk2.git/blame - OptionRomPkg/Include/Library/BltLib.h
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
[mirror_edk2.git] / OptionRomPkg / Include / Library / BltLib.h
CommitLineData
caebd915 1/** @file\r
2 Library for performing video blt operations\r
3\r
98208ad3 4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
96ae5934 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
caebd915 6\r
7**/\r
8\r
9#ifndef __BLT_LIB__\r
10#define __BLT_LIB__\r
11\r
12#include <Protocol/GraphicsOutput.h>\r
13\r
14\r
15/**\r
16 Configure the BltLib for a frame-buffer\r
17\r
18 @param[in] FrameBuffer Pointer to the start of the frame buffer\r
19 @param[in] FrameBufferInfo Describes the frame buffer characteristics\r
20\r
21 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
22 @retval EFI_SUCCESS - Blt operation success\r
23\r
24**/\r
25EFI_STATUS\r
26EFIAPI\r
27BltLibConfigure (\r
28 IN VOID *FrameBuffer,\r
29 IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo\r
30 );\r
31\r
32\r
33/**\r
34 Performs a UEFI Graphics Output Protocol Blt operation.\r
35\r
36 @param[in,out] BltBuffer - The data to transfer to screen\r
37 @param[in] BltOperation - The operation to perform\r
38 @param[in] SourceX - The X coordinate of the source for BltOperation\r
39 @param[in] SourceY - The Y coordinate of the source for BltOperation\r
40 @param[in] DestinationX - The X coordinate of the destination for BltOperation\r
41 @param[in] DestinationY - The Y coordinate of the destination for BltOperation\r
42 @param[in] Width - The width of a rectangle in the blt rectangle in pixels\r
43 @param[in] Height - The height of a rectangle in the blt rectangle in pixels\r
44 @param[in] Delta - Not used for EfiBltVideoFill and EfiBltVideoToVideo operation.\r
45 If a Delta of 0 is used, the entire BltBuffer will be operated on.\r
46 If a subrectangle of the BltBuffer is used, then Delta represents\r
47 the number of bytes in a row of the BltBuffer.\r
48\r
49 @retval EFI_DEVICE_ERROR - A hardware error occured\r
50 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
51 @retval EFI_SUCCESS - Blt operation success\r
52\r
53**/\r
54EFI_STATUS\r
55EFIAPI\r
56BltLibGopBlt (\r
57 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
58 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
59 IN UINTN SourceX,\r
60 IN UINTN SourceY,\r
61 IN UINTN DestinationX,\r
62 IN UINTN DestinationY,\r
63 IN UINTN Width,\r
64 IN UINTN Height,\r
65 IN UINTN Delta\r
66 );\r
67\r
68\r
69/**\r
70 Performs a UEFI Graphics Output Protocol Blt Video Fill.\r
71\r
72 @param[in] Color Color to fill the region with\r
73 @param[in] DestinationX X location to start fill operation\r
74 @param[in] DestinationY Y location to start fill operation\r
75 @param[in] Width Width (in pixels) to fill\r
76 @param[in] Height Height to fill\r
77\r
78 @retval EFI_DEVICE_ERROR - A hardware error occured\r
79 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
80 @retval EFI_SUCCESS - Blt operation success\r
81\r
82**/\r
83EFI_STATUS\r
84EFIAPI\r
85BltLibVideoFill (\r
86 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Color,\r
87 IN UINTN DestinationX,\r
88 IN UINTN DestinationY,\r
89 IN UINTN Width,\r
90 IN UINTN Height\r
91 );\r
92\r
93\r
94/**\r
95 Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation.\r
96\r
97 @param[out] BltBuffer Output buffer for pixel color data\r
98 @param[in] SourceX X location within video\r
99 @param[in] SourceY Y location within video\r
100 @param[in] Width Width (in pixels)\r
101 @param[in] Height Height\r
102\r
103 @retval EFI_DEVICE_ERROR - A hardware error occured\r
104 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
105 @retval EFI_SUCCESS - Blt operation success\r
106\r
107**/\r
108EFI_STATUS\r
109EFIAPI\r
110BltLibVideoToBltBuffer (\r
111 OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,\r
112 IN UINTN SourceX,\r
113 IN UINTN SourceY,\r
114 IN UINTN Width,\r
115 IN UINTN Height\r
116 );\r
117\r
118\r
119/**\r
120 Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation\r
121 with extended parameters.\r
122\r
123 @param[out] BltBuffer Output buffer for pixel color data\r
124 @param[in] SourceX X location within video\r
125 @param[in] SourceY Y location within video\r
126 @param[in] DestinationX X location within BltBuffer\r
127 @param[in] DestinationY Y location within BltBuffer\r
128 @param[in] Width Width (in pixels)\r
129 @param[in] Height Height\r
130 @param[in] Delta Number of bytes in a row of BltBuffer\r
131\r
132 @retval EFI_DEVICE_ERROR - A hardware error occured\r
133 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
134 @retval EFI_SUCCESS - Blt operation success\r
135\r
136**/\r
137EFI_STATUS\r
138EFIAPI\r
139BltLibVideoToBltBufferEx (\r
140 OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,\r
141 IN UINTN SourceX,\r
142 IN UINTN SourceY,\r
143 IN UINTN DestinationX,\r
144 IN UINTN DestinationY,\r
145 IN UINTN Width,\r
146 IN UINTN Height,\r
147 IN UINTN Delta\r
148 );\r
149\r
150\r
151/**\r
152 Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation.\r
153\r
154 @param[in] BltBuffer Output buffer for pixel color data\r
155 @param[in] DestinationX X location within video\r
156 @param[in] DestinationY Y location within video\r
157 @param[in] Width Width (in pixels)\r
158 @param[in] Height Height\r
159\r
160 @retval EFI_DEVICE_ERROR - A hardware error occured\r
161 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
162 @retval EFI_SUCCESS - Blt operation success\r
163\r
164**/\r
165EFI_STATUS\r
166EFIAPI\r
167BltLibBufferToVideo (\r
168 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,\r
169 IN UINTN DestinationX,\r
170 IN UINTN DestinationY,\r
171 IN UINTN Width,\r
172 IN UINTN Height\r
173 );\r
174\r
175\r
176/**\r
177 Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation\r
178 with extended parameters.\r
179\r
180 @param[in] BltBuffer Output buffer for pixel color data\r
181 @param[in] SourceX X location within BltBuffer\r
182 @param[in] SourceY Y location within BltBuffer\r
183 @param[in] DestinationX X location within video\r
184 @param[in] DestinationY Y location within video\r
185 @param[in] Width Width (in pixels)\r
186 @param[in] Height Height\r
187 @param[in] Delta Number of bytes in a row of BltBuffer\r
188\r
189 @retval EFI_DEVICE_ERROR - A hardware error occured\r
190 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
191 @retval EFI_SUCCESS - Blt operation success\r
192\r
193**/\r
194EFI_STATUS\r
195EFIAPI\r
196BltLibBufferToVideoEx (\r
197 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,\r
198 IN UINTN SourceX,\r
199 IN UINTN SourceY,\r
200 IN UINTN DestinationX,\r
201 IN UINTN DestinationY,\r
202 IN UINTN Width,\r
203 IN UINTN Height,\r
204 IN UINTN Delta\r
205 );\r
206\r
207\r
208/**\r
209 Performs a UEFI Graphics Output Protocol Blt Video to Video operation\r
210\r
211 @param[in] SourceX X location within video\r
212 @param[in] SourceY Y location within video\r
213 @param[in] DestinationX X location within video\r
214 @param[in] DestinationY Y location within video\r
215 @param[in] Width Width (in pixels)\r
216 @param[in] Height Height\r
217\r
218 @retval EFI_DEVICE_ERROR - A hardware error occured\r
219 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
220 @retval EFI_SUCCESS - Blt operation success\r
221\r
222**/\r
223EFI_STATUS\r
224EFIAPI\r
225BltLibVideoToVideo (\r
226 IN UINTN SourceX,\r
227 IN UINTN SourceY,\r
228 IN UINTN DestinationX,\r
229 IN UINTN DestinationY,\r
230 IN UINTN Width,\r
231 IN UINTN Height\r
232 );\r
233\r
234\r
235/**\r
236 Returns the sizes related to the video device\r
237\r
238 @param[out] Width Width (in pixels)\r
239 @param[out] Height Height (in pixels)\r
240\r
241 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in\r
242 @retval EFI_SUCCESS - The sizes were returned\r
243\r
244**/\r
245EFI_STATUS\r
246EFIAPI\r
247BltLibGetSizes (\r
248 OUT UINTN *Width, OPTIONAL\r
249 OUT UINTN *Height OPTIONAL\r
250 );\r
251\r
252#endif\r
253\r