public static Bitmap getTileBitmap ( final int pTileSizePx ) { final Bitmap bitmap = BitmapPool . getInstance ( ) . obtainSizedBitmapFromPool ( pTileSizePx , pTileSizePx ) ; if ( bitmap != null ) { return bitmap ; } return Bitmap . createBitmap ( pTileSizePx , pTileSizePx , Bitmap . Config . ARGB_8888 ) ; }
Try to get a tile bitmap from the pool otherwise allocate a new one