From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 72BE01A1E3D for ; Mon, 10 Oct 2016 07:27:01 -0700 (PDT) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B97BD7EA82; Mon, 10 Oct 2016 14:27:00 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-14.phx2.redhat.com [10.3.116.14]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9AEQwx8025703; Mon, 10 Oct 2016 10:26:59 -0400 To: Ruiyu Ni , edk2-devel@ml01.01.org References: <20161009084953.58512-1-ruiyu.ni@intel.com> <20161009084953.58512-3-ruiyu.ni@intel.com> Cc: Justen Jordan , Feng Tian From: Laszlo Ersek Message-ID: <502f0d42-33b4-c5f7-c276-e21aa7b567e6@redhat.com> Date: Mon, 10 Oct 2016 16:26:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161009084953.58512-3-ruiyu.ni@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 10 Oct 2016 14:27:00 +0000 (UTC) Subject: Re: [PATCH v2 2/5] MdeModulePkg: Add FrameBufferBltLib library class 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: Mon, 10 Oct 2016 14:27:01 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 10/09/16 10:49, Ruiyu Ni wrote: > This library provides interfaces to perform UEFI Graphics > Output Protocol Video BLT operations. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ruiyu Ni > Cc: Feng Tian > Cc: Justen Jordan > Cc: Laszlo Ersek > --- > MdeModulePkg/Include/Library/FrameBufferBltLib.h | 94 ++++++++++++++++++++++++ > MdeModulePkg/MdeModulePkg.dec | 4 + > 2 files changed, 98 insertions(+) > create mode 100644 MdeModulePkg/Include/Library/FrameBufferBltLib.h Reviewed-by: Laszlo Ersek > > diff --git a/MdeModulePkg/Include/Library/FrameBufferBltLib.h b/MdeModulePkg/Include/Library/FrameBufferBltLib.h > new file mode 100644 > index 0000000..c92eb94 > --- /dev/null > +++ b/MdeModulePkg/Include/Library/FrameBufferBltLib.h > @@ -0,0 +1,94 @@ > +/** @file > + Library for performing UEFI GOP Blt operations on a framebuffer > + > + Copyright (c) 2009 - 2016, 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 > + 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 __FRAMEBUFFER_BLT_LIB__ > +#define __FRAMEBUFFER_BLT_LIB__ > + > +#include > + > +// > +// Opaque structure for the frame buffer configure. > +// > +typedef struct FRAME_BUFFER_CONFIGURE FRAME_BUFFER_CONFIGURE; > + > +/** > + Create the configuration for a video frame buffer. > + > + The configuration is returned in the caller provided buffer. > + > + @param[in] FrameBuffer Pointer to the start of the frame buffer. > + @param[in] FrameBufferInfo Describes the frame buffer characteristics. > + @param[in,out] Configure The created configuration information. > + @param[in,out] ConfigureSize Size of the configuration information. > + > + @retval RETURN_SUCCESS The configuration was successful created. > + @retval RETURN_BUFFER_TOO_SMALL The Configure is to too small. The required > + size is returned in ConfigureSize. > + @retval RETURN_UNSUPPORTED The requested mode is not supported by > + this implementaion. > +**/ > +RETURN_STATUS > +EFIAPI > +FrameBufferBltConfigure ( > + IN VOID *FrameBuffer, > + IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo, > + IN OUT FRAME_BUFFER_CONFIGURE *Configure, > + IN OUT UINTN *ConfigureSize > + ); > + > +/** > + Performs a UEFI Graphics Output Protocol Blt operation. > + > + @param[in] Configure Pointer to a configuration which was successfully > + created by FrameBufferBltConfigure (). > + @param[in,out] BltBuffer The data to transfer to screen. > + @param[in] BltOperation The operation to perform. > + @param[in] SourceX The X coordinate of the source for BltOperation. > + @param[in] SourceY The Y coordinate of the source for BltOperation. > + @param[in] DestinationX The X coordinate of the destination for > + BltOperation. > + @param[in] DestinationY The Y coordinate of the destination for > + BltOperation. > + @param[in] Width The width of a rectangle in the blt rectangle > + in pixels. > + @param[in] Height The height of a rectangle in the blt rectangle > + in pixels. > + @param[in] Delta Not used for EfiBltVideoFill and > + EfiBltVideoToVideo operation. If a Delta of 0 > + is used, the entire BltBuffer will be operated > + on. If a subrectangle of the BltBuffer is > + used, then Delta represents the number of > + bytes in a row of the BltBuffer. > + > + @retval RETURN_INVALID_PARAMETER Invalid parameter were passed in. > + @retval RETURN_SUCCESS The Blt operation was performed successfully. > +**/ > +RETURN_STATUS > +EFIAPI > +FrameBufferBlt ( > + IN FRAME_BUFFER_CONFIGURE *Configure, > + IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL > + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, > + IN UINTN SourceX, > + IN UINTN SourceY, > + IN UINTN DestinationX, > + IN UINTN DestinationY, > + IN UINTN Width, > + IN UINTN Height, > + IN UINTN Delta > + ); > + > +#endif > diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec > index f870b83..85ff1cf 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -153,6 +153,10 @@ [LibraryClasses] > # > MemoryProfileLib|Include/Library/MemoryProfileLib.h > > + ## @libraryclass Provides an interface for performing UEFI Graphics Output Protocol Video blt operations. > + ## > + FrameBufferBltLib|Include/Library/FrameBufferBltLib.h > + > [Guids] > ## MdeModule package token space guid > # Include/Guid/MdeModulePkgTokenSpace.h >