• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
getMaxSize()11     public int getMaxSize() {
12         return 0;
13     }
14 
15     @Override
setSizeMultiplier(float sizeMultiplier)16     public void setSizeMultiplier(float sizeMultiplier) {
17         // Do nothing.
18     }
19 
20     @Override
put(Bitmap bitmap)21     public boolean put(Bitmap bitmap) {
22         return false;
23     }
24 
25     @Override
get(int width, int height, Bitmap.Config config)26     public Bitmap get(int width, int height, Bitmap.Config config) {
27         return null;
28     }
29 
30     @Override
getDirty(int width, int height, Bitmap.Config config)31     public Bitmap getDirty(int width, int height, Bitmap.Config config) {
32         return null;
33     }
34 
35     @Override
clearMemory()36     public void clearMemory() {
37         // Do nothing.
38     }
39 
40     @Override
trimMemory(int level)41     public void trimMemory(int level) {
42         // Do nothing.
43     }
44 }
45