Laszlo,
The reason I wanted to use the four APIs instead of only one BltLibGopBlt is if 
user just wants to fill video, he can supply less parameters.
I am glad you have no concern to the refine proposal.

Jordan,
Any thought?

Thanks,
Ray

-----Original Message-----
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Monday, August 10, 2015 8:35 PM
To: Ni, Ruiyu <ruiyu...@intel.com>
Cc: Justen, Jordan L <jordan.l.jus...@intel.com>; edk2-devel@lists.01.org 
<edk2-de...@ml01.01.org>
Subject: Re: Library refinement: OptionRomPkg/BltLib

On 08/10/15 05:09, Ni, Ruiyu wrote:
> Jordan and Laszlo,
> 
> I reviewed the OptionRomPkg/BltLib again and would like to discuss with
> you about the potential API refinement.
> 
> I attached two versions of the refined BltLib.h.
> 
> 
> The common part of the two versions is:
> 
> 1.      BltLibGetSizes() is removed.
> 
> Because the size information is actually passed from the library
> consumer to the library. Caller do not need to get the information from
> the library interface.
> 
> 2.      BltLibBufferToVideoEx and BltLibVideoToBltBufferEx are removed
> and the accordingly non-Ex version of APIs will be used for *Ex operation.
> 
> Just for reducing the library APIs and avoid the different APIs have
> overlapped functionality.
> 
> 3.      BltLibGopBlt() is removed
> 
> Same reason as the above #2.
> 
> 
> BltLib2.h contains another change.
> 
> 4.      BltLibConfigure() is removed and the frame buffer information
> will be passed through the four BltLib* APIs.
> 
> Because it can remove the restriction to allow the library can be re-entry.
> 
> 
> What's your thoughts about this?

>From the current (nine) BltLib APIs, "OvmfPkg/QemuVideoDxe/Gop.c" uses two:
- BltLibConfigure() in EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode(),
- BltLibGopBlt() in EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt().

I think the first is easy to adapt to "BltLib2.h"; the mode information
should simply be passed to the new (v2) BltLib APIs. The call we have
right now can be deleted.

Updating the second takes a bit more typing, but it is possible. In
QemuVideoGraphicsOutputBlt() we already have a switch on BltOperation,
but at the moment it is just passed to BltLibGopBlt(), for all four
possible values.

In order to adapt the driver to "BltLib2.h", the four cases will have to
call the four new APIs in "BltLib2.h" separately (passing in the mode
info as well, see above).

So, it's doable.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to