[edk2-devel] [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX

Marvin Häuser Marvin.Haeuser at outlook.com
Tue Sep 24 12:46:14 UTC 2019


From: Marvin Haeuser <mhaeuser at outlook.de>

Currently, SourceX is not considered in the BufferToVideo operation
when the 8-bit pixel format is used. Correctly add the resulting
offset to prevent image corruption.

Cc: Jian J Wang <jian.j.wang at intel.com>
Cc: Hao A Wu <hao.a.wu at intel.com>
Signed-off-by: Marvin Haeuser <mhaeuser at outlook.de>
---
 MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
index 47c5326e9958..a084cc81d32e 100644
--- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
+++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
@@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo (
     Destination = Configure->FrameBuffer + Offset;

 

     if (Configure->PixelFormat == PixelBlueGreenRedReserved8BitPerColor) {

-      Source = (UINT8 *) BltBuffer + (SrcY * Delta);

+      Source = (UINT8 *) BltBuffer + (SrcY * Delta) + (SourceX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));

     } else {

       for (IndexX = 0; IndexX < Width; IndexX++) {

         Blt =

-- 
2.23.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47970): https://edk2.groups.io/g/devel/message/47970
Mute This Topic: https://groups.io/mt/34275800/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list