Home | History | Annotate | Download | only in bitmap_recycle
      1 package com.bumptech.glide.load.engine.bitmap_recycle;
      2 
      3 import android.graphics.Bitmap;
      4 
      5 /**
      6  * An {@link com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool BitmapPool} implementation that rejects all
      7  * {@link android.graphics.Bitmap Bitmap}s added to it and always returns {@code null} from get.
      8  */
      9 public class BitmapPoolAdapter implements BitmapPool {
     10     @Override
     11     public int getMaxSize() {
     12         return 0;
     13     }
     14 
     15     @Override
     16     public void setSizeMultiplier(float sizeMultiplier) {
     17         // Do nothing.
     18     }
     19 
     20     @Override
     21     public boolean put(Bitmap bitmap) {
     22         return false;
     23     }
     24 
     25     @Override
     26     public Bitmap get(int width, int height, Bitmap.Config config) {
     27         return null;
     28     }
     29 
     30     @Override
     31     public Bitmap getDirty(int width, int height, Bitmap.Config config) {
     32         return null;
     33     }
     34 
     35     @Override
     36     public void clearMemory() {
     37         // Do nothing.
     38     }
     39 
     40     @Override
     41     public void trimMemory(int level) {
     42         // Do nothing.
     43     }
     44 }
     45