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

Commit 6a786d5a authored by Tim Murray's avatar Tim Murray Committed by Android (Google) Code Review
Browse files

Merge changes I10a6ea49,I4c8b3331 into udc-dev

* changes:
  Enable modern trim by default.
  hwui: change TRIM_COMPLETE to TRIM_BACKGROUND
parents f0e71f62 8ca6a396
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -117,12 +117,8 @@ void CacheManager::trimMemory(TrimLevel mode) {
    // flush and submit all work to the gpu and wait for it to finish
    mGrContext->flushAndSubmit(/*syncCpu=*/true);

    if (!Properties::isHighEndGfx && mode >= TrimLevel::MODERATE) {
        mode = TrimLevel::COMPLETE;
    }

    switch (mode) {
        case TrimLevel::COMPLETE:
        case TrimLevel::BACKGROUND:
            mGrContext->freeGpuResources();
            SkGraphics::PurgeAllCaches();
            mRenderThread.destroyRenderingContext();
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ final class ActivityManagerConstants extends ContentObserver {
    private static final boolean DEFAULT_USE_TIERED_CACHED_ADJ = false;
    private static final long DEFAULT_TIERED_CACHED_ADJ_DECAY_TIME = 60 * 1000;

    private static final boolean DEFAULT_USE_MODERN_TRIM = false;
    private static final boolean DEFAULT_USE_MODERN_TRIM = true;

    /**
     * Same as {@link TEMPORARY_ALLOW_LIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED}