public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg: Add missing sourceX for Blt
@ 2019-09-16 14:21 Gris87
  2019-09-16 20:57 ` Ni, Ray
  0 siblings, 1 reply; 4+ messages in thread
From: Gris87 @ 2019-09-16 14:21 UTC (permalink / raw)
  To: devel; +Cc: Gris87, Ruiyu Ni

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>
---
 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 47c5326e99..ff7979c962 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.19.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-25  4:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 14:21 [PATCH] MdeModulePkg: Add missing sourceX for Blt Gris87
2019-09-16 20:57 ` Ni, Ray
2019-09-17  6:59   ` Gao, Zhichao
2019-09-25  4:44     ` [edk2-devel] " Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox