mirror of
https://github.com/wasabeef/glide-transformations.git
synced 2025-06-29 12:52:47 +08:00
fix leak code and constractor
This commit is contained in:
parent
71255edcd0
commit
aef7541ea3
@ -47,8 +47,12 @@ public class MaskTransformation implements Transformation<Bitmap> {
|
||||
* same make file name. If you have a good idea please tell us, thanks.
|
||||
*/
|
||||
public MaskTransformation(Context context, int maskId) {
|
||||
mBitmapPool = Glide.get(context).getBitmapPool();
|
||||
mContext = context;
|
||||
this(context, Glide.get(context).getBitmapPool(), maskId);
|
||||
}
|
||||
|
||||
public MaskTransformation(Context context, BitmapPool pool, int maskId) {
|
||||
mBitmapPool = pool;
|
||||
mContext = context.getApplicationContext();
|
||||
mMaskId = maskId;
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,18 @@ public class RoundedCornersTransformation implements Transformation<Bitmap> {
|
||||
this(context, radius, margin, CornerType.ALL);
|
||||
}
|
||||
|
||||
public RoundedCornersTransformation(BitmapPool pool, int radius, int margin) {
|
||||
this(pool, radius, margin, CornerType.ALL);
|
||||
}
|
||||
|
||||
public RoundedCornersTransformation(Context context, int radius, int margin,
|
||||
CornerType cornerType) {
|
||||
mBitmapPool = Glide.get(context).getBitmapPool();
|
||||
this(Glide.get(context).getBitmapPool(), radius, margin, cornerType);
|
||||
}
|
||||
|
||||
public RoundedCornersTransformation(BitmapPool pool, int radius, int margin,
|
||||
CornerType cornerType) {
|
||||
mBitmapPool = pool;
|
||||
mRadius = radius;
|
||||
mDiameter = mRadius * 2;
|
||||
mMargin = margin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user