[DO NOT MERGE] Revert "Send cached target duration when creating sessions"
This reverts commit 73b143c6cd334c5369fa801b54952aa1ebae26c6.
Reason for revert: Performance issues
Bug: 300360668
Bug: 302620048
Change-Id: I2a00c0498392a49f64d1f0e523d3ccbc9b345c57
diff --git a/libs/hwui/renderthread/HintSessionWrapper.cpp b/libs/hwui/renderthread/HintSessionWrapper.cpp
index 565da52..d1ebe6d 100644
--- a/libs/hwui/renderthread/HintSessionWrapper.cpp
+++ b/libs/hwui/renderthread/HintSessionWrapper.cpp
@@ -72,7 +72,6 @@
mSessionValid = true;
mHintSession = nullptr;
}
- mResetsSinceLastReport = 0;
}
bool HintSessionWrapper::init() {
@@ -112,10 +111,10 @@
// Use a placeholder target value to initialize,
// this will always be replaced elsewhere before it gets used
- int64_t targetDurationNanos =
- mLastTargetWorkDuration == 0 ? kDefaultTargetDuration : mLastTargetWorkDuration;
+ int64_t defaultTargetDurationNanos = 16666667;
mHintSessionFuture = CommonPool::async([=, this, tids = std::move(tids)] {
- return mBinding->createSession(manager, tids.data(), tids.size(), targetDurationNanos);
+ return mBinding->createSession(manager, tids.data(), tids.size(),
+ defaultTargetDurationNanos);
});
return false;
}