Re: [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image


Dandan Bi
 

Reviewed-by: Dandan Bi <dandan.bi@...>

-----Original Message-----
From: Gao, Liming
Sent: Wednesday, September 21, 2016 10:39 AM
To: edk2-devel@...
Cc: Dong, Eric <eric.dong@...>; Bi, Dandan <dandan.bi@...>
Subject: [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image

HiiImage protocol implementation doesn't support EFI_HII_IIBT_IMAGE_PNG.

Cc: Eric Dong <eric.dong@...>
Cc: Dandan Bi <dandan.bi@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@...>
---
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index 612d57a..07b3ba0 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -142,8 +142,9 @@ GetImageIdOrAddress (
break;

case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
CopyMem (&Length32, ImageBlock + sizeof (EFI_HII_IMAGE_BLOCK), sizeof (UINT32));
- ImageBlock += Length32;
+ ImageBlock += OFFSET_OF (EFI_HII_IIBT_JPEG_BLOCK, Data) + Length32;
ImageIdCurrent++;
break;

@@ -895,6 +896,7 @@ HiiGetImage (

switch (BlockType) {
case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
//
// BUGBUG: need to be supported as soon as image tool is designed.
//
@@ -1096,6 +1098,7 @@ HiiSetImage (
//
switch (BlockType) {
case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
//
// BUGBUG: need to be supported as soon as image tool is designed.
//
@@ -1497,6 +1500,7 @@ HiiDrawImageId (
//
// Get the specified Image.
//
+ ZeroMem (&Image, sizeof (Image));
Status = HiiGetImage (This, PackageList, ImageId, &Image);
if (EFI_ERROR (Status)) {
return Status;
--
2.8.0.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.