@sjudd sjudd released this Aug 16, 2018 · 17 commits to master since this release

Assets 2

Features

  • Multiple RequestListeners 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 and ViewTarget, see the CustomViewTarget 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. Use RequestOptions#disallowHardwareConfig() instead (7eb59f7)
  • Remove pause() and isPaused() from the internal Request 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.
Apr 13, 2018
Bump version to 4.7.1

@sjudd sjudd released this Apr 10, 2018 · 60 commits to master since this release

Assets 25

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)
  • 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)
  • 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 or ListView preloader before the user scrolls for the first time (dd7fe18, thanks to Anton111111)

Breaking Changes

Build Changes

@sjudd sjudd released this Feb 1, 2018 · 113 commits to master since this release

Assets 25

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

  • Cut build times for Glide by around a factor of two by parallelizing static analysis and unit test tasks on the main library package and removing the redundant release variants across all modules (3968ccb, 1c7434a, 3af80f4, 95637cf)

@sjudd sjudd released this Jan 5, 2018 · 142 commits to master since this release

Assets 26

This is the December release of Glide.

Features

  • Add an API to pause all requests for a given Activity or Fragment to allow callers to manually reduce memory when their Fragment or Application is backgrounded (@kurtisnelson, 09e33a2)
  • Fully support Bitmap re-use for RGBA_F16 Bitmaps. Previously Glide supported decoding RGBA_F16 Bitmaps, but would not re-use any stored in the BitmapPool when doing so (cc0288c)
  • Support decoding Videos from resources as AssetFileDescriptors (6e9866b)
  • Added support for the MediaMetadataRetriever#getScaledFrameAtTime method added in OMR1 to marginally reduce memory usage when decoding video frames (ded8f77)
  • Support transcoding BitmapDrawables to byte[]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 when ResourceEncoder 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 ClassCastExceptions 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 provide Bitmaps with a null 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)
  • Default active resource retention to false (73759b9), but leave the option in GlideBuilder to manually enable it. Enabling active resource retention can lead to recycled Bitmap errors or Bitmap re-use bugs if applications call Bitmap.recycle() on any images loaded by Glide or mutate the contents of Bitmaps loaded by Glide.
  • Treat devices with API < 19 as having ActivityManager.isLowRam set to true (#2650, b221d4b)

Breaking Changes

  • Removed deprecated constructors requiring Contexts in most of Glide's default Transformation (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

Build Changes

@sjudd sjudd released this Dec 4, 2017 · 247 commits to master since this release

Assets 26

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 called clearOnDetach() 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 called waitForLayout() that simplifies the previous mechanism for forcing Glide's ViewTargets 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 after onDestroy of the corresponding Activity or Fragment (#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 GifDrawables could continue to animate after clear() or onStop() (#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 using onlyRetrieveFromCache (#2428, 108a062)
  • Fixed a couple of cases where calling load(Bitmap) or load(Drawable) could cause Glide to re-use or recycle the given Bitmap or Drawable (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 a GlideModule 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 and ReferenceQueue if the Targets 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:

    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
      builder.setIsActiveResourceRetentionAllowed(false);
    }
  • Glide.with(fragment).load() and Glide.with(fragment).asDrawable().load() now behave identically. Previously Glide.with(fragment).asDrawable().load() would apply some specific options based on the type of the model provided to load(), but Glide.with(fragment).load() would not. Now both behave identically (8613292).

  • Calling RequestBuilder.load(byte[]) will no longer override previously set DiskCacheStrategy and skipMemoryCacheOptions options (c7b7dfe).

Breaking Changes

  • The RequestManager.load(Object) method has been augmented with the same type specific overloads that are available on RequestBuilder. Unfortunately this may break some tests that mock the return value of RequestManager.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() in GlideBuilder in favor of setSourceExecutor() (6837543)
  • Deprecated ArrayPool.put(Array, Class<Array>) in favor of ArrayPool.put(Array) (b4d778b)
  • Deprecated the constructor in ViewTarget that accepts a boolean waitForLayout parameter in favor of the waitForLayout() method on ViewTarget (05b8854).

@sjudd sjudd released this Nov 6, 2017 · 360 commits to master since this release

Assets 25

This is a bug fix release of Glide 4.3.0.

Bugfixes

  • Fix ghosting in animated GIFs with certain combinations of disposal settings and frames (c3d0530, #2521, thanks to @michaeimm)
  • Fix a Bitmap re-use bug causing graphical errors, load failures and/or crashes when loading Drawables with a transformation applied that didn't actually change the image for the requested width and height.
    (2371aa6)
  • Fix a race condition causing animated Drawables not to be started when loaded into Views from Glide's memory cache (aa2711b, #2541)

@sjudd sjudd released this Oct 31, 2017 · 370 commits to master since this release

Assets 25

This is the October release of Glide.

Features

  • Added a DiskLruCacheFactory implementation that falls back to the internal cache directory on devices where the external cache directory isn't available (#24, 56a4275, thanks to @ANPez)
  • Added an error API to start a new load if the primary load fails.
    See the docs page for usage. (b06b0cc),
  • Added support for decoding non-Bitmap Drawables and for transforming most of those types of Drawables. Animated Drawables may be loaded if they're supported by the framework or support library, but can't be transformed. Consider using optionalTransform if you want to try to transform non-Bitmap resources but don't want your loads to fail if transformations can't be applied. (#350, a0628b8, 7614e10, fc4a456, 90f1cc9)
  • Added a helper method to avoid nesting when applying multiple levels of thumbnails (bc1b25e)
  • Pass the Context provided to Glide.with() (either the actual Context or the Context of the given Fragment or Activity) into Glide's requests. As a result, Glide will use the Theme of the provided Context automatically. Callers can override the default Theme with the theme() option (#1267, bbb25af).
  • Pass through exception messages to RequestFutureTarget.
    Previously all load failures would throw an ExecutionException with a more or less useless generic error message and stack trace. Now the ExceptionMessage will contain the same failure message that you see logged with the Glide log tag. (65048a4)
  • Added support for passing Bitmaps and Drawables into .load() (7663c21)

Bugs

  • Added @CheckResult to most intermediate builder methods in Glide's various builder classes to avoid errors where developers ignore the results and end up ignoring the options they'd tried to apply (739cb35, 28e461e, thanks to @TWiStErRob)
  • Avoid a concurrency bug in the platform on more varieties of Moto Xs (1e2fb23)
  • Fixed an integer overflow when upscaling images in Downsampler (#2459, c7383b2)
  • Fixed a couple of import style nits (6cd8289, thanks to @brettchabot)
  • Added a separate executor to decode GIF frames on to avoid stuttering when scrolling through lists of GIFs that was caused by Glide's normal threads being blocked by I/O or decoding GIF headers (#899, c4db04e).
  • Fixed corrupt images caused by the RoundedCorners transformation (#2472, 0b5d1bc).
  • Removed an inaccurate Precondition that obfuscated the reasons for load failures (#2462, 890454a)
  • Avoid failing requests for Files types that can't be mmaped (cbe9f42, thanks to @pkorth).
  • Fixed a crash performing network operations when using a GlideExecutor with a custom UncaughtExceptionHandler (#2508, e6e2aef, thanks to @stephanenicolas)
  • Fixed Glide's Futures from blocking forever if the Request or a custom component throws an unexpected exception (74fcad1)
  • Avoid showing incorrect frames when pausing/restarting GIFs (#2526, 90b3b9f)

Build

  • Fixed a bunch of warnings and compile time noise and cleaned up a variety of build files and versions (#2426, thanks to @TWiStErRob)
  • Fixed duplicate class files in the compiler jar (#2452m, 7c09fc1)

Behavior Changes

  • Include the presence or absence (but not equality of) RequestListeners when determining whether or not to ignore new Requests as part of an ongoing effort to avoid unnecessary restarts of in progress loads (#2270, 95caa05).
  • Default GIFs to using ARGB_8888 instead of RGB_565 and add an API to specify the preferred format for GIFs specifically. As a result both GIF quality and memory usage will increase. For details on configuring the format, see the javadocs (#2396, 6f91031).

Breaking Changes

  • GlideExceptions getRootCauses() method will now return a List of Throwable instead of Exception. Doing so allows us to better handle certain expected Errors, like OutOfMemoryException that otherwise have to be caught by our Executor and swallowed. This change was made as part of avoiding behavior in Glide's Futures that could cause them to block forever (74fcad1).

@sjudd sjudd released this Oct 3, 2017 · 447 commits to master since this release

Assets 26

This is the September release of Glide.

Features

  • Added support for replacing Glide's default Encoders (03f5bd4, #2349, thanks to @MistaGreen)
  • Added a more advanced way to control how/when requests are restarted when they have the same cache keys (b667cab, thanks to @Tolriq).
  • Repackaged Glide's annotation processor dependencies to avoid build errors with the generated API caused by dependency conflicts (a0e388e, #2059, thanks to @TWiStErRob)
  • Added a bucketing system when registering custom components to make choosing the order in which the components are called easier and more intuitive (da90633, thanks to asuszek@).
  • Pass Options to ResourceTranscoders to allow customizing behavior (134870e, #2417).
  • Added an interface to allow reporting or uncaught exceptions on Glide's thread pools (a1cd3af, thanks to @stephanenicolas)

Bug fixes

  • Fixed incorrect Bitmap pool sizes on some versions of Android (fe5289d, #2334, thanks to @SUPERCILEX)
  • Fixed a resource leak when following redirects in Glide's default Http library (7f62597, 73a8054, #2352)
  • Fixed a racy resource leak where DataFetchers were sometimes never closed (d482b8e)
  • Fixed load failures due to a simultaneous put exception in Glide's default disk cache (01f5a3d)
  • Fixed Http load failures caused by unexpected characters in the user agent of some devices (3cd0685)
  • Worked around an O specific ClassCastException in the OkHttp support library (a4af922)
  • Fixed logic in RequestFutureTarget to better match the Future documentation (f033e9b)
  • Fixed a few rounding issues when downsampling and transforming images to eliminate hardware bitmap errors and wasteful allocations when decoded Bitmaps from Downsampler are ~1 pixel off of the size required by Transformations (f5ba374, b1b024e, 4b5ccaa)
  • Fix get(View) failing to find non-support Fragments (a0c5af1)
  • Add better null handling to ListPreloader (c3479c4, #2379)
  • Fixed assertions when generated GlideRequests were used to load a model and then modified after the load was started (d56e08c).
  • Fixed load failures on some devices where UUIDs initialization is broken (d67ce32, #1510)
  • Improved performance loading video frames slightly be avoiding duplicate setDataSource calls (a84deb3).
  • Handle all types of exceptions thrown by ResourceDecoders to allow other registered ResourceDecoders to run even if one decoder fails or behaves unexpectedly (6cffaab).
  • Fixed an exception using HARDWARE Bitmaps with images where Glide is unable to determine the original dimensions (f9757a5).
  • Fixed an issue where sometimes the MediaStore thumbnail would be returned when Target.SIZE_ORIGINAL was used (4501396, thanks to asuszek@).

Documentation

  • Added links to a Simplified Chinese translation of Glide's documentation page (ee557b6, thanks to @Muyangmin)
  • Added Google's maven repo for support libraries to the setup example in the readme (3bf2d36, thanks to @rocboronat)

Behavior changes

  • Calling into() or clear() in a RequestListener or Target implementation will now always crash with an assertion. Previously it would sometimes crash depending on how the request was configured. To avoid the exception, you can use Handler#post to post your into() or clear() call to the main thread instead of calling it directly (6fb87b3, #2413)
  • Glide's interpretation of View sizes has changed substantially, see #2431 for more details.
  • Changed the default downsample strategy to CENTER_OUTSIDE on KitKat+ for cases where neither a strategy nor a transformation that uses a strategy is applied to a load (8a90f54, thanks to asuszek@).