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/Scheduler/Scheduler.h b/services/surfaceflinger/Scheduler/Scheduler.h
index c78051a..1773d09 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.h
+++ b/services/surfaceflinger/Scheduler/Scheduler.h
@@ -320,9 +320,10 @@
bool updateFrameRateOverrides(GlobalSignals, Fps displayRefreshRate) EXCLUDES(mPolicyLock);
- // Returns true if the small dirty detection is enabled.
- bool supportSmallDirtyDetection() const {
- return mFeatures.test(Feature::kSmallDirtyContentDetection);
+ // Returns true if the small dirty detection is enabled for the appId.
+ bool supportSmallDirtyDetection(int32_t appId) {
+ return mFeatures.test(Feature::kSmallDirtyContentDetection) &&
+ mSmallAreaDetectionAllowMappings.getThresholdForAppId(appId).has_value();
}
// Injects a delay that is a fraction of the predicted frame duration for the next frame.