Send cached target duration when creating sessions
This fixes an issue where the default target duration was being sent
when re-creating sessions, after the true target duration was already
known. This caused the wrong value in PowerHAL, and no corrective update
was sent because the cached value never changed.
Bug: 301806277
Test: hwuitest
Change-Id: I80d90e855fce92264d8341aad78b19dc547b65f4
diff --git a/libs/hwui/renderthread/HintSessionWrapper.h b/libs/hwui/renderthread/HintSessionWrapper.h
index 36e91ea..41891cd 100644
--- a/libs/hwui/renderthread/HintSessionWrapper.h
+++ b/libs/hwui/renderthread/HintSessionWrapper.h
@@ -65,6 +65,7 @@
static constexpr nsecs_t kResetHintTimeout = 100_ms;
static constexpr int64_t kSanityCheckLowerBound = 100_us;
static constexpr int64_t kSanityCheckUpperBound = 10_s;
+ static constexpr int64_t kDefaultTargetDuration = 16666667;
// Allows easier stub when testing
class HintSessionBinding {