package com.common.commonlib.image.config

import com.bumptech.glide.MemoryCategory

/**
 * 图片加载基础配置
 *
 * @author wangym
 * @since 2021/7/28
 */
object GlideBaseConfig {

    enum class MemoryType(var memoryCategory: MemoryCategory) {
        /**
         * Tells Glide's memory cache and bitmap pool to use at most half of their initial maximum size.
         */
        LOW(MemoryCategory.LOW),

        /**
         * Tells Glide's memory cache and bitmap pool to use at most their initial maximum size.
         */
        NORMAL(MemoryCategory.NORMAL),

        /**
         * Tells Glide's memory cache and bitmap pool to use at most one and a half times their initial
         * maximum size.
         */
        HIGH(MemoryCategory.HIGH)
    }

    enum class LoadMode {
        /**
         * default loading type
         */
        DEFAULT,

        /**
         * cache all resource
         */
        ALL,

        /**
         * skip loading from disk
         */
        SKIP_DISK,

        /**
         * skip loading from memory cache
         */
        SKIP_MEM,

        /**
         * skip loading form all cache
         */
        SKIP_CACHE,

        /**
         * don't load form internet
         */
        SKIP_NET
    }
}