diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-02-28 07:41:28 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-02-28 07:41:28 +0000 |
commit | fad1794ce87433dd806fb1c354462093ce8b64fd (patch) | |
tree | 6315720b00518dc17fd7965b23646dc53e256bee /EdkModulePkg/Universal/Console | |
parent | 2c33bcb4f2bfe2e85d4f6b246b26c96cf971c318 (diff) | |
download | edk2-platforms-fad1794ce87433dd806fb1c354462093ce8b64fd.tar.xz |
1. Fix an issue about the calculation of GlyphBufferSize
2. Fix a bug in handling the overlapped case by reverse-copying the destine region & source region
3. Fix an issue that the leading spaces could not be displayed in highlight mode
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2410 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/Console')
-rw-r--r-- | EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h | 6 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c | 62 |
2 files changed, 54 insertions, 14 deletions
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h index 13c4e743db..54a1e57504 100644 --- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h +++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h @@ -1,7 +1,7 @@ /**@file
Private data structures for the Console Splitter driver
-Copyright (c) 2006 Intel Corporation. <BR>
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
-#ifndef _CON_SPLITER_H_
-#define _CON_SPLITER_H_
+#ifndef _CON_SPLITTER_H_
+#define _CON_SPLITTER_H_
//
// Private Data Structures
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c index 946835ed29..9726889ec8 100644 --- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c +++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c @@ -1,6 +1,6 @@ /*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -378,6 +378,7 @@ DevNullGraphicsOutputBlt ( )
{
UINTN SrcY;
+ BOOLEAN Forward;
UINTN Index;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltPtr;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ScreenPtr;
@@ -434,9 +435,23 @@ DevNullGraphicsOutputBlt ( return EFI_INVALID_PARAMETER;
}
- ScreenPtr = &Private->GraphicsOutputBlt[DestinationY * HorizontalResolution + DestinationX];
- SrcY = SourceY;
- while (Height) {
+ if ((BltOperation == EfiBltVideoToVideo) && (DestinationY > SourceY)) {
+ //
+ // Copy backwards, only care the Video to Video Blt
+ //
+ ScreenPtr = &Private->GraphicsOutputBlt[(DestinationY + Height - 1) * HorizontalResolution + DestinationX];
+ SrcY = SourceY + Height - 1;
+ Forward = FALSE;
+ } else {
+ //
+ // Copy forwards, for other cases
+ //
+ ScreenPtr = &Private->GraphicsOutputBlt[DestinationY * HorizontalResolution + DestinationX];
+ SrcY = SourceY;
+ Forward = TRUE;
+ }
+
+ while (Height != 0) {
if (BltOperation == EfiBltVideoFill) {
for (Index = 0; Index < Width; Index++) {
ScreenPtr[Index] = *BltBuffer;
@@ -451,8 +466,13 @@ DevNullGraphicsOutputBlt ( CopyMem (ScreenPtr, BltPtr, Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
}
- ScreenPtr += HorizontalResolution;
- SrcY++;
+ if (Forward) {
+ ScreenPtr += HorizontalResolution;
+ SrcY ++;
+ } else {
+ ScreenPtr -= HorizontalResolution;
+ SrcY --;
+ }
Height--;
}
}
@@ -792,6 +812,7 @@ DevNullUgaBlt ( )
{
UINTN SrcY;
+ BOOLEAN Forward;
UINTN Index;
EFI_UGA_PIXEL *BltPtr;
EFI_UGA_PIXEL *ScreenPtr;
@@ -848,9 +869,23 @@ DevNullUgaBlt ( return EFI_INVALID_PARAMETER;
}
- ScreenPtr = &Private->UgaBlt[DestinationY * HorizontalResolution + DestinationX];
- SrcY = SourceY;
- while (Height) {
+ if ((BltOperation == EfiUgaVideoToVideo) && (DestinationY > SourceY)) {
+ //
+ // Copy backwards, only care the Video to Video Blt
+ //
+ ScreenPtr = &Private->UgaBlt[(DestinationY + Height - 1) * HorizontalResolution + DestinationX];
+ SrcY = SourceY + Height - 1;
+ Forward = FALSE;
+ } else {
+ //
+ // Copy forwards, for other cases
+ //
+ ScreenPtr = &Private->UgaBlt[DestinationY * HorizontalResolution + DestinationX];
+ SrcY = SourceY;
+ Forward = TRUE;
+ }
+
+ while (Height != 0) {
if (BltOperation == EfiUgaVideoFill) {
for (Index = 0; Index < Width; Index++) {
ScreenPtr[Index] = *BltBuffer;
@@ -865,8 +900,13 @@ DevNullUgaBlt ( CopyMem (ScreenPtr, BltPtr, Width * sizeof (EFI_UGA_PIXEL));
}
- ScreenPtr += HorizontalResolution;
- SrcY++;
+ if (Forward) {
+ ScreenPtr += HorizontalResolution;
+ SrcY ++;
+ } else {
+ ScreenPtr -= HorizontalResolution;
+ SrcY --;
+ }
Height--;
}
}
|