diff options
author | 2022-10-17 21:37:42 +0000 | |
---|---|---|
committer | 2022-10-20 20:07:45 +0000 | |
commit | f1e5df1d266f70a508c7b520fd52feced8fbcf61 (patch) | |
tree | 93b2588fa1ecf9d95ea6192ee0a51cdf20822dc6 /services/surfaceflinger/ClientCache.h | |
parent | b7458aeec6d575bd06e33a83ab26ebd41c3eaa63 (diff) |
SF: Trigger ANR when buffer cache is full
* Updates the transaction queue stall listener to take a string that
contains the reason for hanging.
* Updates ClientCache::add to indicate whether or not a failure is due
to the cache being full
* Calls the transaction queue stall listener when the ClientCache is
full
Bug: 244218818
Test: presubmits
Change-Id: I5fdc9aef0f0a1601ace1c42cfac5024c3de8d299
Diffstat (limited to 'services/surfaceflinger/ClientCache.h')
-rw-r--r-- | services/surfaceflinger/ClientCache.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/surfaceflinger/ClientCache.h b/services/surfaceflinger/ClientCache.h index a9b8177d70..cdeac2bbc1 100644 --- a/services/surfaceflinger/ClientCache.h +++ b/services/surfaceflinger/ClientCache.h @@ -37,7 +37,10 @@ class ClientCache : public Singleton<ClientCache> { public: ClientCache(); - bool add(const client_cache_t& cacheId, const sp<GraphicBuffer>& buffer); + enum class AddError { CacheFull, Unspecified }; + + base::expected<std::shared_ptr<renderengine::ExternalTexture>, AddError> add( + const client_cache_t& cacheId, const sp<GraphicBuffer>& buffer); void erase(const client_cache_t& cacheId); std::shared_ptr<renderengine::ExternalTexture> get(const client_cache_t& cacheId); |