分享

SurfaceFlinger, Frame buffer device, Overlays...

 tracyf 2012-02-07
In general terms, an "overlay" is part of a display controller
hardware block that it uses primarily to combine multiple streams of
image frames into a single output frame which is sent to a display
panel of some sort.  The Android abstraction for this is a hardware
specific library that implements the interface defined in the
overlay.h file, nested deep within the root hardware folder.  In this
abstraction, the surface flinger provides positional control
information and some other entity provide the frame data.  The typical
frame data providers are Camera HAL and Video Playback "HAL".

To answer your questions directly:

1) the hardware performs the frame composition and the overlay library
implementation performs the hardware setup
2) this is implementation dependent.  Some overlay implementations are
based of secondary frame buffer device, other have more proprietary
means.
3) more that likely you would see a black hole where the overlay data
was suppose to show up.  This occurs since many display controllers
don't provide access to the hardware composed output, it goes directly
to the display and never hits a memory buffer you can read from.  So
the screen shot code generally will only read from the UI input buffer
and the overlay contents are missing.  Not all hardware works this
way, but many do.
4) The main use cases are camera preview and video playback.  On most
hardware, it more power efficient to render the higher frame rate data
to the display via hardware overlays.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多