]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Add missing sourceX for Blt
authorGris87 <Gris87@yandex.ru>
Mon, 16 Sep 2019 14:21:47 +0000 (22:21 +0800)
committerHao A Wu <hao.a.wu@intel.com>
Wed, 25 Sep 2019 03:54:53 +0000 (11:54 +0800)
There is no sourceX offset in case when
Configure->PixelFormat == PixelBlueGreenRedReserved8BitPerColor.
We are copying most left pixels instead of copying required rectangle.

Signed-off-by: Gris87 <Gris87@yandex.ru>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c

index 47c5326e99589a076a0d4ed3ff29a12dc035c492..ff7979c962e3ca94a7d9a5cf8ab3035d22a76b2b 100644 (file)
@@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo (
     Destination = Configure->FrameBuffer + Offset;\r
 \r
     if (Configure->PixelFormat == PixelBlueGreenRedReserved8BitPerColor) {\r
-      Source = (UINT8 *) BltBuffer + (SrcY * Delta);\r
+      Source = (UINT8 *) BltBuffer + (SrcY * Delta) + SourceX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);\r
     } else {\r
       for (IndexX = 0; IndexX < Width; IndexX++) {\r
         Blt =\r