SF: guard texture view update tolerance logic with small area allow list
Make sure the texture view update tolerance logic for refresh rate
heuristic only applies to apps in the small area detection allow list.
Bug: 307419914
Test: presubmit
Change-Id: Ieefdc4abe8c6ae8389035914fea4737e00cceeb4
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index f587e9d..b9561dc 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -3255,7 +3255,7 @@
// If the layer had been updated a TextureView, this would make sure the present time could be
// same to TextureView update when it's a small dirty, and get the correct heuristic rate.
- if (mFlinger->mScheduler->supportSmallDirtyDetection()) {
+ if (mFlinger->mScheduler->supportSmallDirtyDetection(mOwnerAppId)) {
if (mDrawingState.useVsyncIdForRefreshRateSelection) {
mUsedVsyncIdForRefreshRateSelection = true;
}
@@ -3288,7 +3288,7 @@
}
}
- if (!mFlinger->mScheduler->supportSmallDirtyDetection()) {
+ if (!mFlinger->mScheduler->supportSmallDirtyDetection(mOwnerAppId)) {
return static_cast<nsecs_t>(0);
}
@@ -4431,7 +4431,7 @@
void Layer::setIsSmallDirty(const Region& damageRegion,
const ui::Transform& layerToDisplayTransform) {
mSmallDirty = false;
- if (!mFlinger->mScheduler->supportSmallDirtyDetection()) {
+ if (!mFlinger->mScheduler->supportSmallDirtyDetection(mOwnerAppId)) {
return;
}