Changelog History
Page 1
-
v4.11.0 Changes
January 08, 2020π Features
- β Add a thread timeout for Glide's threads to reduce memory when Glide is infrequently used in an application (db3acef)
- β Add getters to Bitmap Pool for cache statistics (1382e56, thanks to vtsuei@)
- β Add methods to concurrent integration libraries that allow releasing resources back to Glide's pool (277765705)
- π Allow decoding videos from ByteBuffers so that remote videos can be decoded when using a disk cache strategy other than the default (9190698, #4021)
π Bugs
- π Improve ModelLoader error text (83ba102)
- π Fix errors with thumbnail loaders that could cause flashing to placeholders (690f815)
- π Fix an exception using Arrays.addAll on some devices/versions of Android (42d3f07)
- Work around framework bug that breaks heic/heif decoding on Android Q for applications that opt in to legacy storage or request ACCESS_MEDIA_LOCATION (1c51b24)
- π Improve hardware bitmap use on P+ where more file descriptors are available (e8c841c)
- Avoid removing caller added listeners in GlideFutures (0acd87c)
- Avoid propagating unexpected callbacks from cancelled or failed model loaders (7e750ca)
- π Switch to the support exif library to avoid spurious logs (bd6f894, #3851)
- π Fix deadlock when recursively clearing resources, typically GIFs (100ac4a)
π Deprecations
Behavior Changes
- π Allow decoding files via FileDescriptors when all other types fail so that files with headers exceeding the buffer size can be decoded (typically DNGs with metadata at the end of the file (9281d8e, thanks to timurrrr@)
π₯ Breaking Changes
π Build Changes
-
v4.10.0 Changes
September 18, 2019π Features
- β Added a Mocks library to mock GlideExecutor in unit/emulator tests (e021f6b)
- β Added an integration library to integrate with Guava's ListenableFuture class (9fb1036)
- β Add granular options for rounded corners (f36a9fa, thanks to dlos@)
- Include day/night mode in resource id cache keys (1b391c4)
- β Add an API that can be called on Glide manually to clear memory, especially when apps are backgrounded (8a094e9, thanks to mikewallstedt@)
- β Add simple support for wide gamut color spaces (15a21b1, 7910f68)
- π Release more memory in the background on M+ (525e7ba)
- π Support Fragments not hosted by Acitivities (71359c7, thanks to Daniel Tomasiewicz)
- π Handle contexts with null application contexts (31b501d, thanks to Daniel Tomasiewicz)
π Bugs
- π Fixed incorrect downsampling for rotated images when using Target.SIZE_ORIGINAL (79dac0d, thanks to sonyamollinger@)
- π Fixed returning negative byte values converting ByteBuffers to InputStreams (24f9c28, thanks to sonyamollinger@)
- π Make sure to cancel all preload requests in
cancelAll()
(047c22d, thanks @paynemiller92) - π Fixed a series of concurrency bugs introduced by allowing requests to start on background threads (bee6348, 5cccdfb, 01ea6a5, b2a46ef, 6dc03d8, 4de2cda, b96b000, 8907122, 53438b9)
- π Make sure the specified numbers of threads are actually used in the animation executor (#3575, ac4aa53, thanks to @yuriy-budiyev)
- Avoid blinking when calling
RequestManager#pause
when the thumbnail portion of a request is complete the full portion is still running (2f56153) - π Make it less likely to mix support and non-support fragments (2193306, thanks to @limuyang2)
- Avoid downsampling incorrectly in FitCenter and CenterInside when there was
an exact power of 2 match in one dimension but not the other (3df5445) - Always use orientation corrected sizes in
Downsampler
(#3673, ebdf8be) - π Fix transparency in GifDecoder when using RGB_565 (29c553d, thanks to @lihongyu)
- π Handle security exceptions trying to open MediaStore Uris when applications are given access to a MediaStore Uri via an Intent (#3504, 9c48b48)
- π Fix an unused AnimationExecutor (7bb6f11, thanks to @phxnirvana)
π Deprecations
- π Deprecate method to set custom tags in
CustomViewTarget
(c8d646e)
Behavior Changes
- Custom tags in
CustomViewTarget
are now ignored because they cause Glide to ignore calls toclear()
(c8d646e)
π₯ Breaking Changes
π Build Changes
- β‘οΈ Updated target SDK to 28 (#3880, thanks to @prempalsingh)
- π Disable BuildConfig generation (4039981, thanks to @technoir42)
- β‘οΈ Update Truth (5bb4691, cd37a54, thanks to @cpovirk)
- Migrated Glide to androidx (d8278f4)
- β‘οΈ Update OkHttp to 3.12.1 (f3fafcd)
-
v4.9.0 Changes
February 14, 2019π Features
- π Allow applying RequestOptions directly in a RequestBuilder without the generated API (ed20643)
For example previously to apply centerCrop you'd have use a static method and
apply()
:Glide.with(fragment) .load(url) .apply(centerCropTransform()) .into(imageView);
Or use the generated API and the annotation processor:
GlideApp.with(fragment) .load(url) .centerCrop() .into(imageView);
After this change, even without the generated API/annotation processor you can access standard RequestOptions methods directly:
Glide.with(fragment) .load(url) .centerCrop() .into(imageView);
The generated API is still required for API extensions and to include integration libraries. Hopefully this makes it easier for users who do not include integration libraries and for developers of libraries that are currently unable to use the generated API to use Glide.
- β Add Global/Activity/Fragment scoped RequestListeners (37127f0)
- β Add a CustomTarget class to make it easier to reduce some non-essential boilerplate when implementing custom
Target
s. onLoadCleared still must be implemented by subclasses of CustomTarget (b3b2d7a) - π Support loading resources from dynamic modules (#3308, b57ef34, thanks to @SUPERCILEX)
- β Add a varargs
.transform()
method to replace the equivalent.transforms()
method (#2875, #3365, 8a26a6b, thanks to @aleien) - π Make proguard rules consumable by users of the library (f7d8604, thanks to @rehlma)
- π» Stop forcing all requests to be posted to the main thread to avoid unnecessary UI thread work and avoid delays caused by UI thread processing time for images loaded on background threads (8f1ea5c)
- β Add Animatable2Compat callbacks to GifDrawable so that users can be notified when a GIF animation with a non infinite loop count finishes (#3438, a150301, thanks to @AnwarShahriar)
π Bugs
- π Fixed an issue where different types of requested resources (Bitmap vs Drawable etc) could share a cache key (cad83d2)
- βͺ Work around an odd compiler bug creating new
ArrayList
s from other collections on some devices/versions of Android (#3296, 2ca790a) - β Add Nullable/NonNull annotations to LazyHeaders.Builder (#3446, d6345fb, thanks to @r-ralph)
- β Add a transformation to rotate images (other than from EXIF) (1878585, thanks to @Gnzlt)
- π Fix a race that could lead to doing useless work in MultiModelLoader after cancellation (3c9f92f)
- π Fix a bug in SizeConfigStrategy that could lead to a returned Bitmap having an incorrect config (be51b4e)
- Avoid classifying all images with non-0 exif orientations as having transparency to allow them to be cached as JPEGs instead of PNGs (e515f47)
- β Add a debug API that allows apps to attach a stack trace showing where a Glide request originated from. Note that this is fairly expensive and isn't meant to be used in production (114b885)
- π Fix bugs handling resource Uris that point to resources in other applications (e2df4d0)
π Deprecations
- π Deprecated
.transforms()
, it's replaced with the identical.transform()
method (8a26a6b)
Behavior Changes
- RequestListeners for requests started on background threads can now be called on a background thread (8f1ea5c)
π₯ Breaking Changes
- Subclasses of RequestBuilder/RequestOptions may be broken by ed20643. Typically the breakage is relatively simple to fix, but the exact methods that need to be called or that are exposed may have changed for subclasses.
π Build Changes
- β Add support for incremental annotation processing (#3508, a16a1ba, thanks to @technoir42)
-
v4.8.0 Changes
August 16, 2018π Features
- Multiple
RequestListener
s can be added to a single request (9328999, thanks to Adrian) - β Added a safer version of Glide's base target methods that force callers to implement
onLoadCleared
and deprecated the unsafe versions. Failing to implement onLoadCleared in
a Target can lead to UIs displaying incorrect images, runtime exceptions, or various other resource re-use errors (3a70607, thanks to azlatin@).
π Bugs
- π HEIF orientation is supported on O MR1 and higher via ExifInterface (a3f8114)
- π Improved error message for network failures (#2894, ff463d7)
- Placeholder/error/fallback drawable and id variants now replace previous calls to the same method with the other variant. For example, placeholder(Drawable) will replace previous calls to .placeholder(R.id.xyz)(2dccb5c)
- π Improved synchronization in ModelLoaderRegistry (62e6c11, thanks to @jnlopar)
π Deprecations
- π Deprecated
SimpleTarget
andViewTarget
, see theCustomViewTarget
description in Features in these release notes for more detail.
Behavior Changes
- Requests that are started with a paused RequestManager, usually in a paused Activity or Fragment, are immediately paused so that they display a placeholder instead of nothing (a55e935)
π₯ Breaking Changes
- The deprecated
PREFER_ARGB_8888_DISALLOW_HARDWARE
DecodeFormat
has been removed. UseRequestOptions#disallowHardwareConfig()
instead (7eb59f7) - β Remove
pause()
andisPaused()
from the internalRequest
interface (9089752) - π Glide now uses resource ids (in
CustomViewTarget
) and therefore can no longer be released as a straight jar.
π Build Changes
- β Added support for androidx annotations (c3328fe, thanks to @colinrtwhite)
- β‘οΈ Updated to Android Gradle 3.1.3.
- Multiple
-
v4.7.1
April 13, 2018 -
v4.7.0 Changes
April 10, 2018π Features
- β Added support for data Uris when they're provided as Uris (17c1c3d)
- π Improved scrolling performance by optimizing some Glide internal calls (7664c82, d7635bd, 7ff3bde, thanks to paulsowden@)
- β Added support for downsampling in
VideoBitmapDecoder
(97d130d) - 0οΈβ£ Provide better default names for annotation generated classes (58bcf53, thanks to @SUPERCILEX)
π Bugs
- π Improved handling of cancellation in
VolleyStreamFetcher
(a690f38) - Improved handling of
TRIM_MEMORY_RUNNING_CRITICAL
(d939314, thanks to @ygnessin) - 0οΈβ£ Avoid delaying the first few requests started in Fragments or Activities by defaulting
RequestManagers
to started when the containing Activity or Fragment is started (7d1898e) - π Fixed failures in annotation processor for classes with
_
in the package name (99723e3, thanks to @TWiStErRob) - π Obey themes when retrieving drawables when the appcompat support library is present (5212e95, thanks to @julianostarek)
- π Fixed a bug that could cause loading another application's launcher icon to fail if the calling application's support library version didn't match exactly (f508d7c)
- π Fixed a bug where a pixel was swapped in the output of
GifDecoder
(7fb8b12, thanks to @mtopolnik)
Behavior Changes
- VideoBitmapDecoder will now obey
DownsampleStrategy
(97d130d) - Preload ahead the first page when using the
RecyclerView
orListView
preloader before the user scrolls for the first time (dd7fe18, thanks to Anton111111)
π₯ Breaking Changes
- π Made
GlideBuilder.build
package private (914060e) - π Deprecated non-support fragments (29d481c, thanks to @jaredsburrows)
- β Removed deprecated constructors in transformation implementations (05e3215, b68ba43, 2d0bc2d)
- β Removed
ComponentsCallbacks
fromRequestManager
(1937b05)
π Build Changes
- β‘οΈ Updated to Gradle 4.6 (3a7e262, 86f3276, thanks to @jaredsburrows)
- π Improved
NonNull
checks for Kotlin (a1f5f10, thanks fo @mariotaku)
-
v4.6.1 Changes
February 02, 2018π This is a bugfix release of Glide 4.6.0
π Bugs
π Fixes an issue where pom files in the 4.6.0 release did not list the appropriate dependencies for Glide's various components (#2863)
-
v4.6.0 Changes
February 01, 2018π This is the January release of Glide.
π Features
- π Use buffered streams when writing Bitmap data (860f7d0)
- Allow re-using ARGB_8888 and RGBA_F16 Bitmaps via re-configuration (2cd953c, 17e0943)
π Bugs
- Return the correct size of RGBA_F16 Bitmaps in Util.getBitmapByteSize to avoid obtaining incorrectly sized Bitmaps for re-use in Downsampler (a198ef6)
- Avoid converting RGBA_F16 Bitmaps to ARGB_8888 when running transformations that add transparent pixels (73277df)
- π» Avoid an exception when loading remote images that aren't yet in the cache as Files with
DiskCacheStrategy.AUTOMATIC
(0917ef3, #2824) - Avoid inefficiently trying identical parts of load paths multiple times (9d3a6ff, thanks to
paulsowden@
)
Behavior Changes
- Wide gamut PNGs that were decoded as RGBA_F16 even when BitmapFactoryβs inConfig was set to ARGB_8888 may be affected by improved handling of RGBA_F16 when decoding and transforming images. If you see any issues decoding or transforming PNGs on Android O or higher, please file an issue so we can investigate.
π₯ Breaking Changes
- β Added correct Nullable annotations to all generated classes (35f6a0a, thanks to @SUPERCILEX)
- β Added correct Nullable annotations to RequestManager and other manager classes (bfa237c, thanks to @SUPERCILEX)
- β Add Nullable annotations to the load package (e9f682f, thanks to @SUPERCILEX)
π Build Changes
-
v4.5.0 Changes
January 05, 2018π This is the December release of Glide.
π Features
- β Add an API to pause all requests for a given
Activity
orFragment
to allow callers to manually reduce memory when their Fragment or Application is backgrounded (@kurtisnelson, 09e33a2) - π Fully support Bitmap re-use for
RGBA_F16
Bitmap
s. Previously Glide supported decodingRGBA_F16
Bitmap
s, but would not re-use any stored in theBitmapPool
when doing so (cc0288c) - π Support decoding Videos from resources as
AssetFileDescriptor
s (6e9866b) - β Added support for the
MediaMetadataRetriever#getScaledFrameAtTime
method added in OMR1 to marginally reduce memory usage when decoding video frames (ded8f77) - π Support transcoding
BitmapDrawable
s tobyte[]
s (015d265)
π Bugs
- Cleaned up old and incorrect
@TargetApi
annoatations (@SUPERCILEX, 6778396) - β Added
@Nullable
and@NonNull
annotations to many of Glide's APIs (@SUPERCILEX, dc12b60, c3dafde, 0cffd1d, f541b65, 36e0b80, 650bb77, bd2f215, e35a73b, f37ced1, bb96b63, 276d4ff, c310780, ) - π Fixed a case where restarting an identical request with
skipMemoryCache(true)
would complete the load from the memory cache (#2663, 3dc1d18) - π Fixed decoding interlaced and downsampled GIFs as static images (#2698, b64f23d)
- β Added more models to the list of devices requiring a lock when decoding or drawing Bitmaps (@strooooke, #738, c809f7e, e923554)
- π Fixed a race condition where starting multiple loads simultaneously the first time any request is made for a given model and resource could lead to NPEs (#2708, d427cbd)
- π Make the annotation processor tests pass on Windows (@SUPERCILEX, #2709, 2b4be8b)
- π Fix NPE and RuntimeExceptions thrown in
DefaultConnectivityMonitor
on some devices (c902730) - Only trim to half of the memory cache maximum size, not the current size, when background the app (@kurtisnelson, 429b7e2)
- π Fix a
StateVerifier
exception thrown whenResourceEncoder
implementations unexpectedly throw exceptions while writing resources to Glide's disk cache (6c7cf3f) - π Fix an NPE error message when
ResourceDrawableDecoder
fails to decode an image (d522ac7) - π Fix an
IllegalStateException
if a request using.error()
is cleared while the error request is running (#2767, 9c70aa5) - Cleaned up a number of accessor classes generated by unnecessarily strict visibility in inner classes (@TWiStErRob, e029694)
- β‘οΈ Updated OkHttp and removed a no longer necessary workaround for
ClassCastException
s thrown by the Android framework on O (#2355, 642b2dc) - β Added missing annotations to overrides on some of Glide's generated classes (@TWiStErRob, 62d7464, 9fde006, d7bb6f9)
- Avoid throwing exceptions when
LruBitmapPool
was asked to provideBitmap
s with anull
config (c1036c1)
Behavior Changes
- β Default to
aar
packaging in POMs, so@aar
should no longer be required to avoid warnings about jars depending on aars (06ba344) - 0οΈβ£ Default active resource retention to false (73759b9), but leave the option in
GlideBuilder
to manually enable it. Enabling active resource retention can lead to recycledBitmap
errors orBitmap
re-use bugs if applications callBitmap.recycle()
on any images loaded by Glide or mutate the contents ofBitmap
s loaded by Glide. - Treat devices with API < 19 as having
ActivityManager.isLowRam
set totrue
(#2650, b221d4b)
π₯ Breaking Changes
- β Removed deprecated constructors requiring
Context
s in most of Glide's defaultTransformation
(23975d9, 733b2e0, 9bedc2b, 55594ba, d8f6224, d840533, 2f76842, 144ac53, 150ebab, 92d761d, a6f1b1c) - π The
@NonNull
and@Nullable
annotations added in this release may break builds that depend on compiler plugins that do static nullability analysis, typically due a lack of annotations on any implemenations you might have of Glide's interfaces.
π Deprecations
- π Deprecated
VideoBitmapDecoder
, useVideoDecoder
instead.
π Build Changes
- Glide must be compiled against API 27 (@SUPERCILEX, #2730, 75c2a8b)
- π Glide uses v27 of the support libraries (though v26 should work as well, to use v26 of the support library, see Glide's Android SDK requirements docs page)
- β‘οΈ Updated to PMD 6.0.0 (@TWiStErRob, f16aef4)
- π Fix a PMD failure when building with --profile or any other way in which class files didn't happen to have already been compiled (@TWiStErRob, #2776, fd73179)
- β Add an API to pause all requests for a given
-
v4.4.0 Changes
December 04, 2017π This is the November release of Glide.
π Features
- β‘οΈ Updated Glide's generated API to allow RequestOptions return values and avoid a bunch of
@CheckResult
warnings (e78f2ee, 7fccb32) - Enabled cache sizes >
Integer.MAX_VALUE
(d402780, thanks to @bhargavms) β Added an API to
ViewTarget
calledclearOnDetach()
that allows you to optionally clear and restart requests when the corresponding view is detached and reattached to its window (#2520, d0fd967):Glide.with(fragment) .load(url) .into(imageView) .clearOnDetach();
β Added an API to
ViewTarget
calledwaitForLayout()
that simplifies the previous mechanism for forcing Glide'sViewTargets
to wait for a layout pass before determining the size of the view they wrap (05b8854):Glide.with(fragment) .load(url) .into(imageView) .waitForLayout();
β Added a MockGlideExecutor that could be used as part of a future testing compat library (6cee6d2, thanks to azlatin@)
β Added an API to specify a custom executor to use when decoding GIF frames (6837543)
π Bugs
- π Improved trimming behavior with inconsistent resource sizes (#2550, thanks to @unverbraucht)
- π Fixed overly aggressive escaping of some valid characters in http urls (#2583, 014bf44)
- β Added a direct dependency on support-fragment in Glide's pom (#2547, c1c9be2)
- π Fixed an issue where dereferencing a
Target
without clearing it would result in the loaded resource never being returned to Glide's memory cache (#2560, 0209662, 7e317c0) - π Fixed an IllegalStateException when
RequestManagers
are memoized and then used to start a new load afteronDestroy
of the correspondingActivity
orFragment
(#2262, 8119837) - π Fixed an NPE when using GifDrawables as thumbnails due to a bug that can fail to clear thumbnails in
onStop()
(#2555, 9c82c42) - π Fixed a
SecurityException
on some devices when trying to register a connectivity receiver (#1417, 6bc908b) - π Fixed a
SecurityException
on some devices when trying to obtain connectivity status (#1405, bcd6cc2) - π Fixed a couple of cases where
GifDrawable
s could continue to animate afterclear()
oronStop()
(#1087, 3dad449, 9d87dea) - π Improved decode times for GIF frames on earlier versions of ART and some lower end devices by up to 40% (#2471, e7a4942, fa2ebfe, 7c0cd63, 4db20db, 65e5506)
- Eliminated a few unnecessary object allocations in Glide's request path (b4d778b)
- π Fixed an issue on some devices where
ExternalPreferredCacheDiskCacheFactory.java
might attempt (and fail) to use external storage if the external storage directory exists but isn't writable (#2641, 5580e51, thanks to @ANPez) - Ensure that requests started with
onlyRetrieveFromCache
don't block on already running equivalent requests that aren't usingonlyRetrieveFromCache
(#2428, 108a062) - π Fixed a couple of cases where calling
load(Bitmap)
orload(Drawable)
could cause Glide to re-use or recycle the givenBitmap
orDrawable
(cff4f2c). - π Fixed a bug where the disk cache could become unusable until apps are restarted if the system clears the cache directory while the app is open and the app calls
DiskCache.clear()
(#2465, 16eaa9b). - π Fix a crash attempting to log a recycled Bitmap's size in Glide's
BitmapPool
pre-filling APIs (#2574, 7387298) - π Fixed an error log "Expected to receive an object of but instead got null" when restarting requests with thumbnails where the thumbnail previously completed after the full request (a1e3fa2)
- π Fixed a compilation error when compiling with
kapt
and-Dkotlin.compiler.execution.strategy="in-process"
while using aGlideModule
with the@Excludes
annotation.
Behavior Changes
Resources loaded into Targets outside of Activity/Fragment lifecycles (ie with the Application Context) will be returned to Glide's caches via a
WeakReference
andReferenceQueue
if theTarget
s are dereferenced without being cleared. Previously dereferencing these Targets would simply allow the underlying resource to be garbage collected, which could lead to unexpected cache misses (#2560). Transient memory usage may increase for applications that regularly dereference Targets without clearing them as the resources are now re-captured instead of being immediately and unexpectedly garbage collected.π§ To disable this behavior, in an AppGlideModule, call setIsActiveResourceRetentionAllowed:
@Overridepublic void applyOptions(Context context, GlideBuilder builder) { builder.setIsActiveResourceRetentionAllowed(false); }
Glide.with(fragment).load()
andGlide.with(fragment).asDrawable().load()
now behave identically. PreviouslyGlide.with(fragment).asDrawable().load()
would apply some specific options based on the type of the model provided toload()
, butGlide.with(fragment).load()
would not. Now both behave identically (8613292).Calling
RequestBuilder.load(byte[])
will no longer override previously setDiskCacheStrategy
andskipMemoryCacheOptions
options (c7b7dfe).π₯ Breaking Changes
β The
RequestManager.load(Object)
method has been augmented with the same type specific overloads that are available onRequestBuilder
. Unfortunately this may break some tests that mock the return value ofRequestManager.load()
. Typically those breakages can be resolved by casting:when(requestManager.load((Object) any())).thenReturn(requestBuilder);
β Or if you're passing in
null
as your model in your tests:when(requestManager.load((Object) null)).thenReturn(requestBuilder);
Or if you have a specific type for your model:
when(requestManager.load(any(Uri.class))).thenReturn(requestBuilder);
β Or if your test has a specific type, but your production code uses an Object:
// In tests:String url = ... when(requestManager.load((Object) eq(url))).thenReturn(requestBuilder); // In prod code:Object url = ... requestManager.load(url).into(imageView);
π Deprecations
- π Deprecated void return values for
@GlideOption
and@GlideType
annotated methods (e78f2ee, 7fccb32) - π Deprecated
DiskLruCacheWrapper.get()
in favor of a static factory method (1cfc4af) - π Deprecated
setResizeExecutor()
inGlideBuilder
in favor ofsetSourceExecutor()
(6837543) - π Deprecated
ArrayPool.put(Array, Class<Array>)
in favor ofArrayPool.put(Array)
(b4d778b) - π Deprecated the constructor in
ViewTarget
that accepts a booleanwaitForLayout
parameter in favor of thewaitForLayout()
method onViewTarget
(05b8854).
- β‘οΈ Updated Glide's generated API to allow RequestOptions return values and avoid a bunch of