From d24fbd0b7b58cf454015325fe4521c1c6896ef27 Mon Sep 17 00:00:00 2001 From: Wiwit Rifa'i Date: Mon, 3 Jul 2023 23:27:58 +0800 Subject: libhwc2.1: revert behavior of setLayerCompositionType() This is partial revert of ag/23598344. This will fix power regression & disappearing cursor issues caused by that patch. In ag/23598344, we didn't set mGeometryChanged if the composition is changed back to the original composition (initially set by setLayerCompositionType()) after falling back to client composition in the previous frame. But, it causes some regressions, e.g. power jump and disappearing cursor issues. Thus, this will revert to the previous behavior i.e. to always set mGeometryChanged as dirty whenever we change mCompositionType. Bug: 289010449 Test: v2/android-power-te/functional_media_test_suite/* Test: Use mouse and the cursor shouldn't disappear unexpectedly (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f6f0318b90c6e41d3d7bd456ca32a23b16399aaf) Merged-In: If73dc0353c9e3ede93ff02e675aa879bc54287e4 Change-Id: If73dc0353c9e3ede93ff02e675aa879bc54287e4 --- libhwc2.1/libdevice/ExynosLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libhwc2.1/libdevice/ExynosLayer.cpp b/libhwc2.1/libdevice/ExynosLayer.cpp index 8f1662d..b725f5d 100644 --- a/libhwc2.1/libdevice/ExynosLayer.cpp +++ b/libhwc2.1/libdevice/ExynosLayer.cpp @@ -513,7 +513,7 @@ int32_t ExynosLayer::setLayerCompositionType(int32_t /*hwc2_composition_t*/ type type = HWC2_COMPOSITION_DEVICE; #endif - if (type != mCompositionType && type != mRequestedCompositionType) { + if (type != mCompositionType) { setGeometryChanged(GEOMETRY_LAYER_TYPE_CHANGED); } -- cgit v1.2.3