人工双胞胎费用:SurfaceFlinger, Frame buffer device, Overlays...

来源:百度文库 编辑:中财网 时间:2024/04/28 03:06:26
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.