Synchronize brightness change with frame update for hdr layers.
When the brightness changes while hdr layers are on screen, the dimming
ratio may also change based on ambient conditions, so HWC must
recomposite the scene with the new brightness value.
Bug: 210151839
Test: builds, boots
Change-Id: I4741b28d13f4528a7b5c9045bec7a5823e802935
diff --git a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
index 0067997..361d629 100644
--- a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
+++ b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
@@ -347,6 +347,11 @@
auto notifyPowerBoost(int32_t boostId) { return mFlinger->notifyPowerBoost(boostId); }
+ auto setDisplayBrightness(const sp<IBinder>& display,
+ const gui::DisplayBrightness& brightness) {
+ return mFlinger->setDisplayBrightness(display, brightness);
+ }
+
// Allow reading display state without locking, as if called on the SF main thread.
auto setPowerModeInternal(const sp<DisplayDevice>& display,
hal::PowerMode mode) NO_THREAD_SAFETY_ANALYSIS {