private PoolConfig()

in imagepipeline/src/main/java/com/facebook/imagepipeline/memory/PoolConfig.java [43:92]


  private PoolConfig(Builder builder) {
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.beginSection("PoolConfig()");
    }
    mBitmapPoolParams =
        builder.mBitmapPoolParams == null
            ? DefaultBitmapPoolParams.get()
            : builder.mBitmapPoolParams;
    mBitmapPoolStatsTracker =
        builder.mBitmapPoolStatsTracker == null
            ? NoOpPoolStatsTracker.getInstance()
            : builder.mBitmapPoolStatsTracker;
    mFlexByteArrayPoolParams =
        builder.mFlexByteArrayPoolParams == null
            ? DefaultFlexByteArrayPoolParams.get()
            : builder.mFlexByteArrayPoolParams;
    mMemoryTrimmableRegistry =
        builder.mMemoryTrimmableRegistry == null
            ? NoOpMemoryTrimmableRegistry.getInstance()
            : builder.mMemoryTrimmableRegistry;
    mMemoryChunkPoolParams =
        builder.mMemoryChunkPoolParams == null
            ? DefaultNativeMemoryChunkPoolParams.get()
            : builder.mMemoryChunkPoolParams;
    mMemoryChunkPoolStatsTracker =
        builder.mMemoryChunkPoolStatsTracker == null
            ? NoOpPoolStatsTracker.getInstance()
            : builder.mMemoryChunkPoolStatsTracker;
    mSmallByteArrayPoolParams =
        builder.mSmallByteArrayPoolParams == null
            ? DefaultByteArrayPoolParams.get()
            : builder.mSmallByteArrayPoolParams;
    mSmallByteArrayPoolStatsTracker =
        builder.mSmallByteArrayPoolStatsTracker == null
            ? NoOpPoolStatsTracker.getInstance()
            : builder.mSmallByteArrayPoolStatsTracker;

    mBitmapPoolType =
        builder.mBitmapPoolType == null ? BitmapPoolType.DEFAULT : builder.mBitmapPoolType;
    mBitmapPoolMaxPoolSize = builder.mBitmapPoolMaxPoolSize;
    mBitmapPoolMaxBitmapSize =
        builder.mBitmapPoolMaxBitmapSize > 0
            ? builder.mBitmapPoolMaxBitmapSize
            : BITMAP_POOL_MAX_BITMAP_SIZE_DEFAULT;
    mRegisterLruBitmapPoolAsMemoryTrimmable = builder.mRegisterLruBitmapPoolAsMemoryTrimmable;
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.endSection();
    }
    mIgnoreBitmapPoolHardCap = builder.mIgnoreBitmapPoolHardCap;
  }