-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Description
I found an issue that seemed to be caused by RoundingParams, but was actually related to the mTargetDensity of the BitmapDrawable which used in RoundedBitmapDrawable
When the density changed by App-Self, the issue maybe appeared.
e.g. AndroidAutoSize
Reproduction
Reason
The "blown-up" effect is the result of the updateTransform function:
protected void updateTransform() { |
Trace the following code:
fresco/drawee/src/main/java/com/facebook/drawee/drawable/RoundedBitmapDrawable.java
Line 45 in 19c695f
super(new BitmapDrawable(res, bitmap)); |
Bitmap which used in RoundedBitmapDrawable was from this code:
fresco/imagepipeline/src/main/java/com/facebook/imagepipeline/platform/DefaultDecoder.java
Line 276 in ba69654
decodedBitmap = BitmapFactory.decodeStream(inputStream, null, options); |
The density of the bitmap which is created in DefaultDecoder is default, but when update transform in RoundedDrawable will use resource density which is changed by App-Self to measure transform
Expected
Now, I solved it, by updating density of bitmap in some custom class, such as DrawableFactory or Postprocessor, but it's probably not safe, I hope to get a formal solution