summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Patrick Williams <pdwilliams@google.com> 2023-08-09 18:30:22 -0500
committer Patrick Williams <pdwilliams@google.com> 2023-08-10 14:56:43 -0500
commit271afa97c66442dbf1c2d41f5d5a21fed07d8207 (patch)
tree407fa25526e4ebf3ed1bf47be37d0aeb50b2a3f0
parent85243e40ea970314722eef8432d5e4f01fe9579e (diff)
Update BUFFER_CACHE_MAX_SIZE
Bug: 293398212 Test: presubmits Change-Id: I4d82ebacc8ef7c2ae32c61f40720082aa0af6941
-rw-r--r--libs/gui/SurfaceComposerClient.cpp2
-rw-r--r--services/surfaceflinger/ClientCache.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 48a97b2a7e..0b20186610 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -59,7 +59,7 @@
#include <private/gui/ComposerServiceAIDL.h>
// This server size should always be smaller than the server cache size
-#define BUFFER_CACHE_MAX_SIZE 64
+#define BUFFER_CACHE_MAX_SIZE 4096
namespace android {
diff --git a/services/surfaceflinger/ClientCache.h b/services/surfaceflinger/ClientCache.h
index b56b252d9f..fefc04054d 100644
--- a/services/surfaceflinger/ClientCache.h
+++ b/services/surfaceflinger/ClientCache.h
@@ -29,7 +29,9 @@
#include <set>
#include <unordered_map>
-#define BUFFER_CACHE_MAX_SIZE 64
+// 4096 is based on 64 buffers * 64 layers. Once this limit is reached, the least recently used
+// buffer is uncached before the new buffer is cached.
+#define BUFFER_CACHE_MAX_SIZE 4096
namespace android {