Add a flag for the VRR small dirty detection

Test: presubmit
Bug: 283055450
Change-Id: Iea2b2edc65e2b5d702f380c655c37327f0aa1308
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 12aacad..d0e3959 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4015,7 +4015,7 @@
 
     if (sysprop::use_content_detection_for_refresh_rate(false)) {
         features |= Feature::kContentDetection;
-        if (base::GetBoolProperty("debug.sf.enable_small_dirty_detection"s, false)) {
+        if (flags::vrr_small_dirty_detection()) {
             features |= Feature::kSmallDirtyContentDetection;
         }
     }
diff --git a/services/surfaceflinger/surfaceflinger_flags.aconfig b/services/surfaceflinger/surfaceflinger_flags.aconfig
index d4ab786..fedf08b 100644
--- a/services/surfaceflinger/surfaceflinger_flags.aconfig
+++ b/services/surfaceflinger/surfaceflinger_flags.aconfig
@@ -30,3 +30,11 @@
   bug: "284845445"
   is_fixed_read_only: true
 }
+
+flag {
+  name: "vrr_small_dirty_detection"
+  namespace: "core_graphics"
+  description: "Controls small dirty detection for VRR"
+  bug: "283055450"
+  is_fixed_read_only: true
+}