diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-06-30 10:59:42 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-10-12 10:42:15 +0800 |
commit | 62d8cb3b9ceba5e5b29609ebc71715f523738f85 (patch) | |
tree | 244baefdf307dc3f804e1db66d3d842a7904e7b3 /MdeModulePkg | |
parent | c0f09820762bac020c4a57057a5cd82775519512 (diff) | |
download | edk2-62d8cb3b9ceba5e5b29609ebc71715f523738f85.tar.gz edk2-62d8cb3b9ceba5e5b29609ebc71715f523738f85.tar.bz2 edk2-62d8cb3b9ceba5e5b29609ebc71715f523738f85.zip |
MdeModulePkg: Add FrameBufferBltLib library class
This library provides interfaces to perform UEFI Graphics
Output Protocol Video BLT operations.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Cc: Justen Jordan <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Include/Library/FrameBufferBltLib.h | 94 | ||||
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dec | 4 |
2 files changed, 98 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Library/FrameBufferBltLib.h b/MdeModulePkg/Include/Library/FrameBufferBltLib.h new file mode 100644 index 0000000000..c92eb94885 --- /dev/null +++ b/MdeModulePkg/Include/Library/FrameBufferBltLib.h @@ -0,0 +1,94 @@ +/** @file
+ Library for performing UEFI GOP Blt operations on a framebuffer
+
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
+ IMPLIED.
+
+**/
+
+#ifndef __FRAMEBUFFER_BLT_LIB__
+#define __FRAMEBUFFER_BLT_LIB__
+
+#include <Protocol/GraphicsOutput.h>
+
+//
+// Opaque structure for the frame buffer configure.
+//
+typedef struct FRAME_BUFFER_CONFIGURE FRAME_BUFFER_CONFIGURE;
+
+/**
+ Create the configuration for a video frame buffer.
+
+ The configuration is returned in the caller provided buffer.
+
+ @param[in] FrameBuffer Pointer to the start of the frame buffer.
+ @param[in] FrameBufferInfo Describes the frame buffer characteristics.
+ @param[in,out] Configure The created configuration information.
+ @param[in,out] ConfigureSize Size of the configuration information.
+
+ @retval RETURN_SUCCESS The configuration was successful created.
+ @retval RETURN_BUFFER_TOO_SMALL The Configure is to too small. The required
+ size is returned in ConfigureSize.
+ @retval RETURN_UNSUPPORTED The requested mode is not supported by
+ this implementaion.
+**/
+RETURN_STATUS
+EFIAPI
+FrameBufferBltConfigure (
+ IN VOID *FrameBuffer,
+ IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo,
+ IN OUT FRAME_BUFFER_CONFIGURE *Configure,
+ IN OUT UINTN *ConfigureSize
+ );
+
+/**
+ Performs a UEFI Graphics Output Protocol Blt operation.
+
+ @param[in] Configure Pointer to a configuration which was successfully
+ created by FrameBufferBltConfigure ().
+ @param[in,out] BltBuffer The data to transfer to screen.
+ @param[in] BltOperation The operation to perform.
+ @param[in] SourceX The X coordinate of the source for BltOperation.
+ @param[in] SourceY The Y coordinate of the source for BltOperation.
+ @param[in] DestinationX The X coordinate of the destination for
+ BltOperation.
+ @param[in] DestinationY The Y coordinate of the destination for
+ BltOperation.
+ @param[in] Width The width of a rectangle in the blt rectangle
+ in pixels.
+ @param[in] Height The height of a rectangle in the blt rectangle
+ in pixels.
+ @param[in] Delta Not 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.
+
+ @retval RETURN_INVALID_PARAMETER Invalid parameter were passed in.
+ @retval RETURN_SUCCESS The Blt operation was performed successfully.
+**/
+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
+ );
+
+#endif
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 6d13760d69..d9152186c7 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -153,6 +153,10 @@ #
MemoryProfileLib|Include/Library/MemoryProfileLib.h
+ ## @libraryclass Provides an interface for performing UEFI Graphics Output Protocol Video blt operations.
+ ##
+ FrameBufferBltLib|Include/Library/FrameBufferBltLib.h
+
[Guids]
## MdeModule package token space guid
# Include/Guid/MdeModulePkgTokenSpace.h
|