MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 15 Jan 2018 03:42:01 +0000 (11:42 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 16 Jan 2018 05:26:55 +0000 (13:26 +0800)
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>
MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c

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