Enable HWC2_CAPABILITY_SKIP_VALIDATE
- Without HWC2_CAPABILITY_SKIP_VALIDATE enabled, SurfaceFlinger will always initiate VALIDATE and PRESENT binder transactions separately.
- With HWC2_CAPABILITY_SKIP_VALIDATE the SurfaceFlinger will invoke PresentOrValidate transaction, and in case client composition is required, it will prepare CLIENT layer and call the PRESENT transaction again.
In case whole composition can be composed without involving SurfaceFlinger GLES compositor, a lot of CPU time can be saved:
According to trace (which was captured on RPI4), 2mS-2.5mS of frame time can be saved, which is about 13%-15% of CPU time.