]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / OptionRomPkg / Library / FrameBufferBltLib / FrameBufferBltLib.c
index dd54b0799b26676542d7c5b530b7b7174b0296a5..955ae3dfeac99eda6923f711ac480c9b8b80792b 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   FrameBufferBltLib - Library to perform blt operations on a frame buffer.\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2007 - 2011, 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
   http://opensource.org/licenses/bsd-license.php\r
@@ -65,9 +65,8 @@ ConfigurePixelBitMaskFormat (
   }\r
   MergedMasks = (UINT32) (MergedMasks | Masks[3]);\r
 \r
-  mBltLibBytesPerPixel = HighBitSet32 (MergedMasks);\r
-  ASSERT (mBltLibBytesPerPixel >= 0);\r
-  mBltLibBytesPerPixel = (mBltLibBytesPerPixel + 7) / 8;\r
+  ASSERT (MergedMasks != 0);\r
+  mBltLibBytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8);\r
 \r
   DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));\r
 \r
@@ -237,7 +236,6 @@ BltLibVideoFill (
   )\r
 {\r
   UINTN                           DstY;\r
-  VOID                            *BltMemSrc;\r
   VOID                            *BltMemDst;\r
   UINTN                           X;\r
   UINT8                           Uint8;\r
@@ -348,7 +346,6 @@ BltLibVideoFill (
               );\r
             X = X + MIN (X, Width - X);\r
           }\r
-          BltMemSrc = (VOID *) mBltLibLineBuffer;\r
           LineBufferReady = TRUE;\r
         }\r
         CopyMem (BltMemDst, mBltLibLineBuffer, WidthInBytes);\r
@@ -615,7 +612,7 @@ BltLibBufferToVideoEx (
     BltMemDst = (VOID*) (mBltLibFrameBuffer + Offset);\r
 \r
     if (mPixelFormat == PixelBlueGreenRedReserved8BitPerColor) {\r
-      BltMemSrc = (VOID *) (UINT8 *) BltBuffer + (SrcY * Delta);\r
+      BltMemSrc = (VOID *) ((UINT8 *) BltBuffer + (SrcY * Delta));\r
     } else {\r
       for (X = 0; X < Width; X++) {\r
         Blt =\r