From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6F4491A1E3D for ; Tue, 20 Sep 2016 19:41:41 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 20 Sep 2016 19:41:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,371,1470726000"; d="scan'208";a="11538331" Received: from shwde7172.ccr.corp.intel.com ([10.239.9.23]) by fmsmga005.fm.intel.com with ESMTP; 20 Sep 2016 19:41:40 -0700 From: Liming Gao To: edk2-devel@lists.01.org Cc: Eric Dong , Dandan Bi Date: Wed, 21 Sep 2016 10:39:10 +0800 Message-Id: <1474425551-9056-3-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1474425551-9056-1-git-send-email-liming.gao@intel.com> References: <1474425551-9056-1-git-send-email-liming.gao@intel.com> Subject: [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 02:41:41 -0000 HiiImage protocol implementation doesn't support EFI_HII_IIBT_IMAGE_PNG. Cc: Eric Dong Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: 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