From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D10901A1E3E for ; Wed, 28 Sep 2016 20:29:39 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 28 Sep 2016 20:29:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,413,1470726000"; d="scan'208";a="174394620" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by fmsmga004.fm.intel.com with ESMTP; 28 Sep 2016 20:29:38 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Liming Gao Date: Thu, 29 Sep 2016 11:29:32 +0800 Message-Id: <20160929032932.535452-4-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: <20160929032932.535452-1-ruiyu.ni@intel.com> References: <20160929032932.535452-1-ruiyu.ni@intel.com> Subject: [PATCH v2 3/3] MdeModulePkg/ImageDecoderLib: Retire it due to new BootLogoLib 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: Thu, 29 Sep 2016 03:29:40 -0000 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Liming Gao --- MdeModulePkg/Include/Library/ImageDecoderLib.h | 76 ------------- .../Library/ImageDecoderLib/ImageDecoderLib.c | 121 --------------------- .../Library/ImageDecoderLib/ImageDecoderLib.inf | 43 -------- .../Library/ImageDecoderLib/ImageDecoderLib.uni | 26 ----- 4 files changed, 266 deletions(-) delete mode 100644 MdeModulePkg/Include/Library/ImageDecoderLib.h delete mode 100644 MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.c delete mode 100644 MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf delete mode 100644 MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.uni diff --git a/MdeModulePkg/Include/Library/ImageDecoderLib.h b/MdeModulePkg/Include/Library/ImageDecoderLib.h deleted file mode 100644 index 928a094..0000000 --- a/MdeModulePkg/Include/Library/ImageDecoderLib.h +++ /dev/null @@ -1,76 +0,0 @@ -/** @file - This library provides image decoding service by managing the different - image decoding libraries. - -Copyright (c) 2015, 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 that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ -#ifndef __IMAGE_DECODER_LIB_H__ -#define __IMAGE_DECODER_LIB_H__ -#include - -typedef -EFI_STATUS -(EFIAPI *DECODE_IMAGE)( - IN IMAGE_FORMAT ImageFormat, - IN UINT8 *Image, - IN UINTN ImageSize, - OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **GopBlt, - OUT UINTN *GopBltSize, - OUT UINTN *PixelWidth, - OUT UINTN *PixelHeight - ); - -/** - Convert a graphics image to a callee allocated GOP blt buffer. - - @param ImageFormat Format of the image file. - @param Image Pointer to image file. - @param ImageSize Number of bytes in Image. - @param GopBlt Buffer containing GOP version of Image. - @param GopBltSize Size of GopBlt in bytes. - @param PixelWidth Width of GopBlt/Image in pixels. - @param PixelHeight Height of GopBlt/Image in pixels. - - @retval EFI_SUCCESS GopBlt and GopBltSize are returned. - @retval EFI_INVALID_PARAMETER GopBlt or GopBltSize is NULL. - @retval EFI_INVALID_PARAMETER Image is NULL or ImageSize is 0. - @retval EFI_UNSUPPORTED Image is not supported. - @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate. - -**/ -EFI_STATUS -EFIAPI -DecodeImage ( - IN IMAGE_FORMAT ImageFormat, - IN UINT8 *Image, - IN UINTN ImageSize, - OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **GopBlt, - OUT UINTN *GopBltSize, - OUT UINTN *PixelWidth, - OUT UINTN *PixelHeight - ); - -/** - Register an image decoder. - - @param Decoder An image decoder. - - @retval EFI_SUCCESS The decoder was successfully registered. - @retval EFI_OUT_OF_RESOURCES No enough resource to register the decoder. - -**/ -EFI_STATUS -EFIAPI -RegisterImageDecoder ( - IN DECODE_IMAGE Decoder - ); - -#endif diff --git a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.c b/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.c deleted file mode 100644 index 4a6219b..0000000 --- a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.c +++ /dev/null @@ -1,121 +0,0 @@ -/** @file - This library provides image decoding service by managing the different - image decoding libraries. - -Copyright (c) 2011 - 2015, 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 that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include -#include -#include -#include -#include -#include - -typedef struct { - UINT32 Signature; - DECODE_IMAGE Decoder; - LIST_ENTRY Link; -} IMAGE_DECODER_ENTRY; -#define IMAGE_DECODER_ENTRY_SIGNATURE SIGNATURE_32 ('i', 'm', 'g', 'd') -#define IMAGE_DECODER_ENTRY_FROM_LINK(Link) \ - CR (Link, IMAGE_DECODER_ENTRY, Link, IMAGE_DECODER_ENTRY_SIGNATURE) - -LIST_ENTRY mImageDecoderLibDecoders = INITIALIZE_LIST_HEAD_VARIABLE (mImageDecoderLibDecoders); - -/** - Convert a graphics image to a callee allocated GOP blt buffer. - - @param ImageFormat Format of the image file. - @param Image Pointer to image file. - @param ImageSize Number of bytes in Image. - @param GopBlt Buffer containing GOP version of Image. - @param GopBltSize Size of GopBlt in bytes. - @param PixelWidth Width of GopBlt/Image in pixels. - @param PixelHeight Height of GopBlt/Image in pixels. - - @retval EFI_SUCCESS GopBlt and GopBltSize are returned. - @retval EFI_INVALID_PARAMETER GopBlt or GopBltSize is NULL. - @retval EFI_INVALID_PARAMETER Image is NULL or ImageSize is 0. - @retval EFI_UNSUPPORTED Image is not supported. - @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate. - -**/ -EFI_STATUS -EFIAPI -DecodeImage ( - IN IMAGE_FORMAT ImageFormat, - IN UINT8 *Image, - IN UINTN ImageSize, - OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **GopBlt, - OUT UINTN *GopBltSize, - OUT UINTN *PixelWidth, - OUT UINTN *PixelHeight - ) -{ - IMAGE_DECODER_ENTRY *Entry; - LIST_ENTRY *Link; - EFI_STATUS Status; - - if ((GopBlt == NULL) || (GopBltSize == NULL)) { - return EFI_INVALID_PARAMETER; - } - - if ((Image == NULL) || (ImageSize == 0)) { - return EFI_INVALID_PARAMETER; - } - - for ( Link = GetFirstNode (&mImageDecoderLibDecoders) - ; !IsNull (&mImageDecoderLibDecoders, Link) - ; Link = GetNextNode (&mImageDecoderLibDecoders, Link) - ) { - Entry = IMAGE_DECODER_ENTRY_FROM_LINK (Link); - Status = Entry->Decoder (ImageFormat, Image, ImageSize, GopBlt, GopBltSize, PixelWidth, PixelHeight); - if (!EFI_ERROR (Status)) { - break; - } - } - - if (IsNull (&mImageDecoderLibDecoders, Link)) { - return EFI_UNSUPPORTED; - } else { - return EFI_SUCCESS; - } -} - -/** - Register an image decoder. - - @param Decoder An image decoder. - - @retval EFI_SUCCESS The decoder was successfully registered. - @retval EFI_OUT_OF_RESOURCES No enough resource to register the decoder. - -**/ -EFI_STATUS -EFIAPI -RegisterImageDecoder ( - IN DECODE_IMAGE Decoder - ) -{ - IMAGE_DECODER_ENTRY *Entry; - - Entry = AllocatePool (sizeof (IMAGE_DECODER_ENTRY)); - if (Entry == NULL) { - return EFI_OUT_OF_RESOURCES; - } - - Entry->Signature = IMAGE_DECODER_ENTRY_SIGNATURE; - Entry->Decoder = Decoder; - InsertTailList (&mImageDecoderLibDecoders, &Entry->Link); - - return EFI_SUCCESS; -} \ No newline at end of file diff --git a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf b/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf deleted file mode 100644 index 7ebeec6..0000000 --- a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf +++ /dev/null @@ -1,43 +0,0 @@ -## @file -# This library provides image decoding service by managing the different -# image decoding libraries. -# -# Copyright (c) 2011 - 2015, 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 that accompanies this distribution. -# The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php. -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = ImageDecoderLib - MODULE_UNI_FILE = ImageDecoderLib.uni - FILE_GUID = 5ACDA5F7-AE20-4A17-90C1-7D087F730202 - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = ImageDecoderLib|DXE_DRIVER UEFI_APPLICATION - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources] - ImageDecoderLib.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - -[LibraryClasses] - BaseLib - MemoryAllocationLib - UefiLib - BaseMemoryLib - DebugLib \ No newline at end of file diff --git a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.uni b/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.uni deleted file mode 100644 index b37a92e..0000000 --- a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.uni +++ /dev/null @@ -1,26 +0,0 @@ -// /** @file -// This library provides image decoding service by managing the different -// -// image decoding libraries. -// -// Copyright (c) 2015, 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 that accompanies this distribution. -// The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php. -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// **/ - -#string STR_MODULE_ABSTRACT -#language en-US -"This library provides image decoding service by managing the different" - -#string STR_MODULE_DESCRIPTION -#language en-US -"image decoding libraries." - - -- 2.9.0.windows.1