Hi Guoyin.

Android Overlay has provide the no-memory-copy method.
You can see swapBuffer interface in .
frameworks/base/include/ui/Overlay.h.

It is similar to current ISurface:postBuffer().

But I think how it working  depend on HW capibility.
You can see overlay_device_t must implemented base on HW.
If driver is a simple fb driver only provide 1 memory, then the for
implement  overlay_device_t::swapBuffer, they must do memory copy.
if driver can support using 2 buffer (like v4l2 output driver), it can
do swapBuffer without memory-copy.

The similar issue is the size and position. If driver can't support
it ,overlay_device_t implementation should do by SW method.

BTW , I think createOverlay provide  a video output device , NOT a
simple memory.
So using it just for 2-buffer is some waste.

You can sent E-mail to me. (Can in Chinese)
I am glad discuss with you.


On 12月22日, 下午5时58分, waterblood <[email protected]> wrote:
> Hi Hanchao3c,
>
>    I just compare the overlay Android will support with Windows DDraw
> interface. Just wonder whether it is possible that Android will
> provided one feature as DDraw in overlay surface.
> In DDraw, Overlay Surface can be created with several surfaces buffer
> attach to, which are called as backup surfaces. And provide function
> to swap the backup surfaces with Overlay surface. It will do some good
> in video decoding. There are some codecs which need more than two
> frame buffers for output. In that case , it can directly reuse the
> overlay surface buffer with backup surfaces, so no memcpy needed.
> So that need createOverlay can take some extra parameters to create
> the backup surfaces. And swapBuffers with parameter to point to swap
> specific surface.
>
> Thanks
> Guoyin Chen
>
> > =========================================================
> > It seems swapBuffers just for using double-buffer. like current
> > PostBuffer method/
> > Whether it can overlay  more than 2 buffers  depends on HW.
> > Most Display HW only can support no more than 2 video plane.
> > You can refer S3C24A0/PXA/OMAP data sheet.
>
> > But I seems there needn't  using 2 HW overlay (for video ) at same
> > time.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to