Skip to content

Version 1.4.0

Compare
Choose a tag to compare
@kirwan kirwan released this 17 Jul 12:00
· 2651 commits to main since this release

Animated Image Changes

Rewritten implementation for animated images (GIFs and animated WebPs) with better performance, particularly when showing multiple GIFs.

This brings improved frame caching and memory management, better control for users of Fresco, new features and some GIF rendering issues have been fixed.

Other Updates in 1.4.0

  • Support for Bitmap.prepareToDraw to upload bitmaps to the GPU ahead of time (as suggested by @
    ChrisCraik) - enabled via ImagePipelineExperiments
  • Fixed Shared Element Transitions. You have to manually call draweeView.setLegacyVisibilityHandlingEnabled(true)
  • Per-image custom drawable factory support
  • Caching improvements
    • You can now set a custom cache trim strategy for the image pipeline
    • Added BaseCacheEventListener that implements CacheEventListener for convenience
  • Easier synchronous requests with DataSources#waitForFinalResult
  • Fixed IncreasingQualityDataSource to keep the low res image if the high res request fails
  • Various other bug fixes and improvements: BitmapCounterProvider, Media Variations, Progressive JPEGs, EXIF parsing, ZoomableDraweeView touch logic, DraweeView attributes in Android Studio

Breaking Changes

AnimatedDrawable

The old animation code has been removed, including AbstractAnimatedDrawable, AnimatedDrawable, or AnimatedDrawableSupport . Change your casts to AnimatedDrawable2.
We also removed com.facebook.fresco:animated-base-support since it is no longer needed.

DrawableFactory

Moved DrawableFactory to com.facebook.imagepipeline.drawable.DrawableFactory. Please change your imports if you're using custom drawable factories.

Small cache threshold

Removed this option from ImagePipelineExperiments as well as related code.

Internal changes

Added void onNewResult(T newResult, @Status int status) to Consumer interface.

Removed deprecated methods

  • ImagePipeline#getDataSourceSupplier(ImageRequest, Object, boolean)
  • EncodedImage#setEncodedCacheKey(CacheKey)
  • EncodedImage#getEncodedCacheKey()
  • GenericDraweeHierarchyBuilder#setActualImageMatrix()
  • GenericDraweeHierarchyBuilder#getActualImageMatrix()

Sample Apps (now with Kotlin!)

We've updated our Showcase sample app to include more samples and merged other sample apps into it.

There is also a new Kotlin sample app that shows how to use Fresco with Kotlin.