SF: Move/Refactor Layer::setPerFrameData

Moves functionality out of ColorLayer, BufferLayer, BufferStateLayer and
BufferQueueLayer related to setting the per-frame data.

Instead each of the front-end classes now implements a minimal function
to set the per-frame state into the LayerFECompositionState structure.

compositionengine::OutputLayer now takes care of sending the state to
the HWC, and in particular with detecting when client composition needs
to be forced due to lack of HWC support (though the front-end can also
set a flag to force client composition for a few things it knows about).

SurfaceFlinger::calculateWorkingSet is also refactored to work with the
changes made, and prepare it to be moved over to CompositionEngine.

Test: atest libsurfaceflinger_unittest libcompositionengine_test
Test: atest CtsColorModeTestCases
Test: atest CtsDisplayTestCases
Test: atest CtsGraphicsTestCases
Test: atest CtsUiRenderingTestCases
Test: atest CtsViewTestCases
Test: atest android.media.cts.EncodeVirtualDisplayWithCompositionTest
Bug: 121291683
Change-Id: I2cb0442f68ec5c5f65f5b4cb418dda4c42e5dc39
38 files changed