Home | History | Annotate | Download | only in glide
      1 package com.bumptech.glide;
      2 
      3 /**
      4  * An enum for dynamically modifying the amount of memory Glide is able to use.
      5  */
      6 public enum MemoryCategory {
      7     /**
      8      * Tells Glide's memory cache and bitmap pool to use at most half of their initial maximum size.
      9      */
     10     LOW(0.5f),
     11     /**
     12      * Tells Glide's memory cache and bitmap pool to use at most their initial maximum size.
     13      */
     14     NORMAL(1f),
     15     /**
     16      * Tells Glide's memory cache and bitmap pool to use at most one and a half times their initial maximum size.
     17      */
     18     HIGH(1.5f);
     19 
     20     private float multiplier;
     21 
     22     MemoryCategory(float multiplier) {
     23         this.multiplier = multiplier;
     24     }
     25 
     26     /**
     27      * Returns the multiplier that should be applied to the initial maximum size of Glide's memory cache and bitmap
     28      * pool.
     29      */
     30     public float getMultiplier() {
     31         return multiplier;
     32     }
     33 }
     34