diff options
author | Wiwit Rifa'i <wiwitrifai@google.com> | 2023-04-11 14:59:40 +0800 |
---|---|---|
committer | Wiwit Rifa'i <wiwitrifai@google.com> | 2023-06-06 16:51:37 +0800 |
commit | ba60527e79815ed03f2760728a0778a2ab6eabba (patch) | |
tree | d914cc9f52e31674ddb271b4b7dd2a274636902e /libhwc2.1/libdevice/ExynosLayer.cpp | |
parent | a5f01d4ae93a775f1eb60f41884c826715bc2bb1 (diff) |
libhwc2.1: mark as non-frame update for reverting composition to original
When some layers fallback to CLIENT composition, mCompositionType will
be set to CLIENT during acceptDisplayChanges() since SF will update
its state according to the validated type. But, SF may revert the
requested composition back to the original composition (e.g. DEVICE),
so HWC should not consider it as a frame update if there's no other
update.
This will prevent refresh rate indicator to increase unexpectedly when
updating the refresh rate indicator but there are some layers fallback
to client composition.
Bug: 277999360
Bug: 283352279
Test: refresh rate indicator can enter idle on wallpaper & style
Change-Id: Iaa33fbad555d7a0de65d77edc2a287c8e8940dc3
Merged-In: Iaa33fbad555d7a0de65d77edc2a287c8e8940dc3
Diffstat (limited to 'libhwc2.1/libdevice/ExynosLayer.cpp')
-rw-r--r-- | libhwc2.1/libdevice/ExynosLayer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libhwc2.1/libdevice/ExynosLayer.cpp b/libhwc2.1/libdevice/ExynosLayer.cpp index 79a9ca1..dbf8cbd 100644 --- a/libhwc2.1/libdevice/ExynosLayer.cpp +++ b/libhwc2.1/libdevice/ExynosLayer.cpp @@ -39,6 +39,7 @@ ExynosLayer::ExynosLayer(ExynosDisplay* display) : ExynosMPPSource(MPP_SOURCE_LAYER, this), mDisplay(display), mCompositionType(HWC2_COMPOSITION_INVALID), + mRequestedCompositionType(HWC2_COMPOSITION_INVALID), mExynosCompositionType(HWC2_COMPOSITION_INVALID), mValidateCompositionType(HWC2_COMPOSITION_INVALID), mValidateExynosCompositionType(HWC2_COMPOSITION_INVALID), @@ -512,11 +513,12 @@ int32_t ExynosLayer::setLayerCompositionType(int32_t /*hwc2_composition_t*/ type type = HWC2_COMPOSITION_DEVICE; #endif - if (type != mCompositionType) { + if (type != mCompositionType && type != mRequestedCompositionType) { setGeometryChanged(GEOMETRY_LAYER_TYPE_CHANGED); } mCompositionType = type; + mRequestedCompositionType = type; return HWC2_ERROR_NONE; } |