]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data
[mirror_edk2.git] / MdeModulePkg / Library / FrameBufferBltLib / FrameBufferBltLib.c
index 011d9c52cdfca2a1773728315ea727fd0a1718cb..3078fe6254c57e7a5cd511d0fdff090c104f61ee 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