Merge changes I10a6ea49,I4c8b3331 into udc-dev
* changes: Enable modern trim by default. hwui: change TRIM_COMPLETE to TRIM_BACKGROUND
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user