SF: Add ro.surface_flinger.min_acquired_buffers
This is a minimum count of buffers to indicate when computing the return
value for ISurfaceComposer.getMaxAcquiredBufferCount(). The value is
read from "ro.surface_flinger.min_acquired_buffers" if set, otherwise
the default of value of 1 is used if not.
Setting values larger than 1 affects how many buffers apps should
allocate to keep the display pipeline busy.
Bug: 239574096
Bug: 239575317
Test: Configuring "2" works.
Test: atest libsurfaceflinger_unittest
Change-Id: I4e3a441bdf94cddebb766e6bf73f7cdb82aacd0d
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index b7d2047..9187168 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -226,6 +226,10 @@
// FramebufferSurface
static int64_t maxFrameBufferAcquiredBuffers;
+ // Controls the minimum acquired buffers SurfaceFlinger will suggest via
+ // ISurfaceComposer.getMaxAcquiredBufferCount().
+ static int64_t minAcquiredBuffers;
+
// Controls the maximum width and height in pixels that the graphics pipeline can support for
// GPU fallback composition. For example, 8k devices with 4k GPUs, or 4k devices with 2k GPUs.
static uint32_t maxGraphicsWidth;