1

I have been reading this URL to understand surface flinger.

https://source.android.com/devices/graphics/arch-sf-hwc

Wherein, the below block I am unable to understand. It would be great if someone explains with an example.

Overlay planes may be less efficient than GL composition when nothing on the screen is changing. This is particularly true when overlay contents have transparent pixels and overlapping layers are blended together. In such cases, the HWC can choose to request GLES composition for some or all layers and retain the composited buffer. If SurfaceFlinger comes back asking to composite the same set of buffers, the HWC can continue to show the previously-composited scratch buffer. This can improve the battery life of an idle device.

Szymon
  • 42,577
  • 16
  • 96
  • 114
DrunkenMaster
  • 1,218
  • 3
  • 14
  • 28

1 Answers1

4

Imagine compositing two planes.

If you use display controller overlay planes then every output frame scanned out to the panel will read two planes.

If you use GPU composition then the first frame after a change is more expensive:

  • GPU reads two planes
  • GPU writes one plane
  • Display controller reads one plane

... so four sets of memory access rather than just two. However if nothing changes for the next scan-out you can skip the GPU composition step and just have the display controller read the previously composited buffer:

  • Display controller reads one plane

... which saves you one frame read during scan out compared to just using overlay planes all the time.

solidpixel
  • 10,688
  • 1
  • 20
  • 33