Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ccda761 authored by Zhao Qin's avatar Zhao Qin
Browse files

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
parent ad73c57d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;