From 6ccda761cadaa498372c05c33e186e9a48f514fb Mon Sep 17 00:00:00 2001 From: Zhao Qin Date: Tue, 28 Nov 2023 16:33:47 +0800 Subject: Fix gpu resource not cleaned up Gpu resource is not purged as expected in new implementation when app stays in foreground. Test: manual, adb shell dumpsys gfxinfo Change-Id: I15deb71693e726661c8bae70c7ae30cff2dcfa6b --- libs/hwui/renderthread/CacheManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index babce88b8e1e..f69555600376 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -277,7 +277,7 @@ void CacheManager::onThreadIdle() { const nsecs_t now = systemTime(CLOCK_MONOTONIC); // Rate limiting - if ((now - mLastDeferredCleanup) < 25_ms) { + if ((now - mLastDeferredCleanup) > 25_ms) { mLastDeferredCleanup = now; const nsecs_t frameCompleteNanos = mFrameCompletions[0]; const nsecs_t frameDiffNanos = now - frameCompleteNanos; -- cgit v1.2.3-59-g8ed1b