Fix 5x and 6P crash when using HWC2to1adapter
Angler and Bullhead crash when a SolidColor layer is used in
combination with HWC2to1Adapter. This is due to assumptions in
the HWC1 code (non-null handle field = valid pointer). This
assumption is incorrect with a background layer because it will
set the field backgroundcolor...which occupies the same location
as handle field in hwc_layer_1_t.
This patch detects whether the HWC supports BACKGROUND layer and
sets backgroundcolor/handle accordingly to HWC assumption.
Test: Manual on Angler and Bullhead.
Change-Id: Ic5c3366a4a8989f3a82b6367258bad8af25d3990
2 files changed