SF: Allow triple buffering on values above 3
SurfaceFlinger will enable triple buffering only when configstore
propery maxFrameBufferAcquiredBuffers is equal to 3. This is an
issue for some vendors who set maxFrameBufferAcquiredBuffers to 4
and above.
This patch enable "triple buffering" behavior for any value of
maxFrameBufferAcquiredBuffers above or equal to 3.
Bug: 62024458
Test: Manual
Change-Id: I18f1124fdaf2d25611b4e91e6e9177955f82726a
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index fc60002..744dd50 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -65,7 +65,7 @@
using namespace android::hardware::configstore::V1_0;
static bool useTripleFramebuffer = getInt64< ISurfaceFlingerConfigs,
- &ISurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers>(2) == 3;
+ &ISurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers>(2) >= 3;
#if !defined(EGL_EGLEXT_PROTOTYPES) || !defined(EGL_ANDROID_swap_rectangle)
// Dummy implementation in case it is missing.