FrameBufferBltLib.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe FrameBufferBltLib - Library to perform blt operations on a frame buffer.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe This program and the accompanying materials
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov are licensed and made available under the terms and conditions of the BSD License
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe which accompanies this distribution. The full text of the license may be found at
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define MAX_LINE_BUFFER_SIZE (SIZE_4KB * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe mPixelShl[Loop] = HighBitSet32 (Masks[Loop]) - 23 + (Loop * 8);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe MergedMasks = (UINT32) (MergedMasks | Masks[Loop]);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEBUG ((EFI_D_INFO, "%d: shl:%d shr:%d mask:%x\n", Loop, mPixelShl[Loop], mPixelShr[Loop], Masks[Loop]));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe MergedMasks = (UINT32) (MergedMasks | Masks[3]);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe mBltLibBytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CopyMem (&mPixelBitMasks, BitMask, sizeof (*BitMask));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Configure the FrameBufferLib instance
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] FrameBuffer Pointer to the start of the frame buffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] FrameBufferInfo Describes the frame buffer characteristics
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_UNSUPPORTED - The BltLib does not support this configuration
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - Blt operation success
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe { 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 };
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 };
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ConfigurePixelBitMaskFormat (&(FrameBufferInfo->PixelInformation));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ASSERT (FrameBufferInfo->PixelFormat != PixelBltOnly);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe mBltLibWidthInPixels = (UINTN) FrameBufferInfo->HorizontalResolution;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe mBltLibHeight = (UINTN) FrameBufferInfo->VerticalResolution;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe mBltLibWidthInBytes = mBltLibWidthInPixels * mBltLibBytesPerPixel;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ASSERT (mBltLibWidthInBytes < sizeof (mBltLibLineBuffer));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt operation.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in,out] BltBuffer - The data to transfer to screen
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] BltOperation - The operation to perform
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceX - The X coordinate of the source for BltOperation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceY - The Y coordinate of the source for BltOperation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationX - The X coordinate of the destination for BltOperation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationY - The Y coordinate of the destination for BltOperation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width - The width of a rectangle in the blt rectangle in pixels
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height - The height of a rectangle in the blt rectangle in pixels
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Delta - Not used for EfiBltVideoFill and EfiBltVideoToVideo operation.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe If a Delta of 0 is used, the entire BltBuffer will be operated on.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe If a subrectangle of the BltBuffer is used, then Delta represents
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe the number of bytes in a row of the BltBuffer.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - Blt operation success
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt Video Fill.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Color Color to fill the region with
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationX X location to start fill operation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationY Y location to start fill operation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width Width (in pixels) to fill
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height Height to fill
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - The sizes were returned
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // BltBuffer to Video: Source is BltBuffer, destination is Video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEBUG ((EFI_D_INFO, "VideoFill: Past screen (Y)\n"));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (DestinationX + Width > mBltLibWidthInPixels) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEBUG ((EFI_D_INFO, "VideoFill: Past screen (X)\n"));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEBUG ((EFI_D_INFO, "VideoFill: Width or Height is 0\n"));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 << mPixelShl[0]) >> mPixelShr[0]) & mPixelBitMasks.RedMask) |
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 << mPixelShl[1]) >> mPixelShr[1]) & mPixelBitMasks.GreenMask) |
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 << mPixelShl[2]) >> mPixelShr[2]) & mPixelBitMasks.BlueMask)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe VDEBUG ((EFI_D_INFO, "VideoFill: color=0x%x, wide-fill=0x%x\n", Uint32, WideFill));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // If the size of the pixel data evenly divides the sizeof
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // WideFill, then a wide fill operation can be used
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if ((sizeof (WideFill) % mBltLibBytesPerPixel) == 0) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for (X = mBltLibBytesPerPixel; X < sizeof (WideFill); X++) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ((UINT8*)&WideFill)[X] = ((UINT8*)&WideFill)[X % mBltLibBytesPerPixel];
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // If all the bytes in the pixel are the same value, then use
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // a wide fill operation.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SetMem ((VOID*) &WideFill, sizeof (WideFill), Uint8);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (UseWideFill && (DestinationX == 0) && (Width == mBltLibWidthInPixels)) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe VDEBUG ((EFI_D_INFO, "VideoFill (wide, one-shot)\n"));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BltMemDst = (VOID*) (mBltLibFrameBuffer + Offset);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SetMem32 (BltMemDst, SizeInBytes & ~3, (UINT32) WideFill);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SetMem (BltMemDst, SizeInBytes, (UINT8)(UINTN) WideFill);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for (DstY = DestinationY; DstY < (Height + DestinationY); DstY++) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Offset = (DstY * mBltLibWidthInPixels) + DestinationX;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BltMemDst = (VOID*) (mBltLibFrameBuffer + Offset);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (UseWideFill && (((UINTN) BltMemDst & 7) == 0)) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SetMem64 (BltMemDst, SizeInBytes & ~7, WideFill);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CopyMem (BltMemDst, (VOID*) &WideFill, SizeInBytes);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe VDEBUG ((EFI_D_INFO, "VideoFill (not wide)\n"));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CopyMem (mBltLibLineBuffer, &WideFill, mBltLibBytesPerPixel);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (mBltLibLineBuffer + (X * mBltLibBytesPerPixel)),
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CopyMem (BltMemDst, mBltLibLineBuffer, WidthInBytes);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[out] BltBuffer Output buffer for pixel color data
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceX X location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceY Y location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width Width (in pixels)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height Height
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - The sizes were returned
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe with extended parameters.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[out] BltBuffer Output buffer for pixel color data
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceX X location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceY Y location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationX X location within BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationY Y location within BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width Width (in pixels)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height Height
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Delta Number of bytes in a row of BltBuffer
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - The sizes were returned
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // Video to BltBuffer: Source is Video, destination is BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // If Delta is zero, then the entire BltBuffer is being used, so Delta
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // is the number of bytes in each row of BltBuffer. Since BltBuffer is Width pixels size,
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // the number of bytes in each row can be computed.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Delta = Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // Video to BltBuffer: Source is Video, destination is BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for (SrcY = SourceY, DstY = DestinationY; DstY < (Height + DestinationY); SrcY++, DstY++) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Offset = (SrcY * mBltLibWidthInPixels) + SourceX;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BltMemSrc = (VOID *) (mBltLibFrameBuffer + Offset);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (mPixelFormat == PixelBlueGreenRedReserved8BitPerColor) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (DestinationX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (mPixelFormat != PixelBlueGreenRedReserved8BitPerColor) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for (X = 0; X < Width; X++) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltBuffer + (DstY * Delta) + (DestinationX + X) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Uint32 = *(UINT32*) (mBltLibLineBuffer + (X * mBltLibBytesPerPixel));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 & mPixelBitMasks.RedMask) >> mPixelShl[0]) << mPixelShr[0]) |
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 & mPixelBitMasks.GreenMask) >> mPixelShl[1]) << mPixelShr[1]) |
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov (((Uint32 & mPixelBitMasks.BlueMask) >> mPixelShl[2]) << mPixelShr[2])
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] BltBuffer Output buffer for pixel color data
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationX X location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationY Y location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width Width (in pixels)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height Height
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - The sizes were returned
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe with extended parameters.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] BltBuffer Output buffer for pixel color data
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceX X location within BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceY Y location within BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationX X location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationY Y location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width Width (in pixels)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height Height
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Delta Number of bytes in a row of BltBuffer
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - The sizes were returned
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // BltBuffer to Video: Source is BltBuffer, destination is Video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (DestinationX + Width > mBltLibWidthInPixels) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // If Delta is zero, then the entire BltBuffer is being used, so Delta
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // is the number of bytes in each row of BltBuffer. Since BltBuffer is Width pixels size,
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe // the number of bytes in each row can be computed.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Delta = Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for (SrcY = SourceY, DstY = DestinationY; SrcY < (Height + SourceY); SrcY++, DstY++) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Offset = (DstY * mBltLibWidthInPixels) + DestinationX;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BltMemDst = (VOID*) (mBltLibFrameBuffer + Offset);
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (mPixelFormat == PixelBlueGreenRedReserved8BitPerColor) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BltMemSrc = (VOID *) ((UINT8 *) BltBuffer + (SrcY * Delta));
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for (X = 0; X < Width; X++) {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ((SourceX + X) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe *(UINT32*) (mBltLibLineBuffer + (X * mBltLibBytesPerPixel)) =
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 << mPixelShl[0]) >> mPixelShr[0]) & mPixelBitMasks.RedMask) |
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 << mPixelShl[1]) >> mPixelShr[1]) & mPixelBitMasks.GreenMask) |
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (((Uint32 << mPixelShl[2]) >> mPixelShr[2]) & mPixelBitMasks.BlueMask)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Performs a UEFI Graphics Output Protocol Blt Video to Video operation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceX X location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] SourceY Y location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationX X location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] DestinationY Y location within video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Width Width (in pixels)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @param[in] Height Height
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_DEVICE_ERROR - A hardware error occured
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @retval EFI_SUCCESS - The sizes were returned
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov // Video to Video: Source is Video, destination is Video
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe if (DestinationX + Width > mBltLibWidthInPixels) {
while (Height > 0) {
Height--;
return EFI_SUCCESS;
return EFI_SUCCESS;