MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data

Unused ColorDepth was removed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Tested-by: Christian Ehrhardt <ehrhardt@genua.de>
(cherry picked from commit 043944c550)
This commit is contained in:
Ruiyu Ni
2018-01-15 11:42:01 +08:00
parent 1378dd73eb
commit 20e16af964

View File

@ -1,7 +1,7 @@
/** @file /** @file
FrameBufferBltLib - Library to perform blt operations on a frame buffer. FrameBufferBltLib - Library to perform blt operations on a frame buffer.
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR> Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -21,11 +21,10 @@
#include <Library/FrameBufferBltLib.h> #include <Library/FrameBufferBltLib.h>
struct FRAME_BUFFER_CONFIGURE { struct FRAME_BUFFER_CONFIGURE {
UINTN ColorDepth; UINT32 WidthInBytes;
UINTN WidthInBytes; UINT32 BytesPerPixel;
UINTN BytesPerPixel; UINT32 WidthInPixels;
UINTN WidthInPixels; UINT32 Height;
UINTN Height;
UINT8 *FrameBuffer; UINT8 *FrameBuffer;
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
EFI_PIXEL_BITMASK PixelMasks; EFI_PIXEL_BITMASK PixelMasks;
@ -53,7 +52,7 @@ CONST EFI_PIXEL_BITMASK mBgrPixelMasks = {
VOID VOID
FrameBufferBltLibConfigurePixelFormat ( FrameBufferBltLibConfigurePixelFormat (
IN CONST EFI_PIXEL_BITMASK *BitMask, IN CONST EFI_PIXEL_BITMASK *BitMask,
OUT UINTN *BytesPerPixel, OUT UINT32 *BytesPerPixel,
OUT INT8 *PixelShl, OUT INT8 *PixelShl,
OUT INT8 *PixelShr OUT INT8 *PixelShr
) )
@ -84,7 +83,7 @@ FrameBufferBltLibConfigurePixelFormat (
MergedMasks = (UINT32) (MergedMasks | Masks[3]); MergedMasks = (UINT32) (MergedMasks | Masks[3]);
ASSERT (MergedMasks != 0); ASSERT (MergedMasks != 0);
*BytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8); *BytesPerPixel = (UINT32) ((HighBitSet32 (MergedMasks) + 7) / 8);
DEBUG ((DEBUG_INFO, "Bytes per pixel: %d\n", *BytesPerPixel)); DEBUG ((DEBUG_INFO, "Bytes per pixel: %d\n", *BytesPerPixel));
} }
@ -115,7 +114,7 @@ FrameBufferBltConfigure (
) )
{ {
CONST EFI_PIXEL_BITMASK *BitMask; CONST EFI_PIXEL_BITMASK *BitMask;
UINTN BytesPerPixel; UINT32 BytesPerPixel;
INT8 PixelShl[4]; INT8 PixelShl[4];
INT8 PixelShr[4]; INT8 PixelShr[4];
@ -164,8 +163,8 @@ FrameBufferBltConfigure (
Configure->BytesPerPixel = BytesPerPixel; Configure->BytesPerPixel = BytesPerPixel;
Configure->PixelFormat = FrameBufferInfo->PixelFormat; Configure->PixelFormat = FrameBufferInfo->PixelFormat;
Configure->FrameBuffer = (UINT8*) FrameBuffer; Configure->FrameBuffer = (UINT8*) FrameBuffer;
Configure->WidthInPixels = (UINTN) FrameBufferInfo->HorizontalResolution; Configure->WidthInPixels = FrameBufferInfo->HorizontalResolution;
Configure->Height = (UINTN) FrameBufferInfo->VerticalResolution; Configure->Height = FrameBufferInfo->VerticalResolution;
Configure->WidthInBytes = Configure->WidthInPixels * Configure->BytesPerPixel; Configure->WidthInBytes = Configure->WidthInPixels * Configure->BytesPerPixel;
return RETURN_SUCCESS; return RETURN_SUCCESS;