diff --git a/CHANGELOG.md b/CHANGELOG.md index a02ad5744d..b791dff5c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [3.0.0-alpha08] - July 8, 2024 + +- **BREAKING**: Rename `ImageRequest` and `ImageLoader` `dispatcher` methods to `coroutineContext`. For instance, `ImageRequest.Builder.dispatcher` is now `ImageRequest.Builder.coroutineContext`. This was renamed as the method now accepts any `CoroutineContext` and no longer requires a `Dispatcher`. +- Fix: Fix `IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied` which could occur due to a race condition. + - NOTE: This reintroduces a soft dependency on `Dispatchers.Main.immediate`. As a result you should re-add a dependency on [`kotlinx-coroutines-swing`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-swing/) on JVM. If it's not imported then `ImageRequest`s won't be dispatched immediately and will have one frame of delay before setting the `ImageRequest.placeholder` or resolving from the memory cache. + ## [3.0.0-alpha07] - June 26, 2024 - **BREAKING**: `AsyncImagePainter` no longer waits for `onDraw` by default and instead uses `Size.ORIGINAL`. diff --git a/coil-compose-core/src/androidMain/baseline-prof.txt b/coil-compose-core/src/androidMain/baseline-prof.txt index 59e11d3b79..220f04ca8d 100644 --- a/coil-compose-core/src/androidMain/baseline-prof.txt +++ b/coil-compose-core/src/androidMain/baseline-prof.txt @@ -24,9 +24,8 @@ HSPLcoil3/compose/AsyncImagePainter;->access$updateRequest(Lcoil3/compose/AsyncI HSPLcoil3/compose/AsyncImagePainter;->access$updateState(Lcoil3/compose/AsyncImagePainter;Lcoil3/compose/AsyncImagePainter$State;)V HSPLcoil3/compose/AsyncImagePainter;->getAlpha()F HPLcoil3/compose/AsyncImagePainter;->getColorFilter()Landroidx/compose/ui/graphics/ColorFilter; -HPLcoil3/compose/AsyncImagePainter;->getIntrinsicSize-NH-jbRc()J +HSPLcoil3/compose/AsyncImagePainter;->getIntrinsicSize-NH-jbRc()J HPLcoil3/compose/AsyncImagePainter;->getPainter()Landroidx/compose/ui/graphics/painter/Painter; -HSPLcoil3/compose/AsyncImagePainter;->getPreviewHandler$coil_compose_core_release()Lcoil3/compose/AsyncImagePreviewHandler; HSPLcoil3/compose/AsyncImagePainter;->getScope$coil_compose_core_release()Lkotlinx/coroutines/CoroutineScope; HSPLcoil3/compose/AsyncImagePainter;->get_input$coil_compose_core_release()Lkotlinx/coroutines/flow/MutableStateFlow; HPLcoil3/compose/AsyncImagePainter;->onDraw(Landroidx/compose/ui/graphics/drawscope/DrawScope;)V @@ -59,6 +58,7 @@ Lcoil3/compose/AsyncImagePainter$State$Empty; HSPLcoil3/compose/AsyncImagePainter$State$Empty;->()V HSPLcoil3/compose/AsyncImagePainter$State$Empty;->()V HSPLcoil3/compose/AsyncImagePainter$State$Empty;->equals(Ljava/lang/Object;)Z +HSPLcoil3/compose/AsyncImagePainter$State$Empty;->getPainter()Landroidx/compose/ui/graphics/painter/Painter; Lcoil3/compose/AsyncImagePainter$State$Error; Lcoil3/compose/AsyncImagePainter$State$Loading; HSPLcoil3/compose/AsyncImagePainter$State$Loading;->()V @@ -71,22 +71,22 @@ HSPLcoil3/compose/AsyncImagePainter$State$Success;->()V HSPLcoil3/compose/AsyncImagePainter$State$Success;->(Landroidx/compose/ui/graphics/painter/Painter;Lcoil3/request/SuccessResult;)V HSPLcoil3/compose/AsyncImagePainter$State$Success;->getPainter()Landroidx/compose/ui/graphics/painter/Painter; HSPLcoil3/compose/AsyncImagePainter$State$Success;->getResult()Lcoil3/request/SuccessResult; -Lcoil3/compose/AsyncImagePainter$onRemembered$1$1; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1;->(Lcoil3/compose/AsyncImagePainter;Lkotlin/coroutines/Continuation;)V -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1;->access$invokeSuspend$updateState(Lcoil3/compose/AsyncImagePainter;Lcoil3/compose/AsyncImagePainter$State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1;->invokeSuspend$updateState(Lcoil3/compose/AsyncImagePainter;Lcoil3/compose/AsyncImagePainter$State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -HPLcoil3/compose/AsyncImagePainter$onRemembered$1$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; -Lcoil3/compose/AsyncImagePainter$onRemembered$1$1$2; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$2;->(Lcoil3/compose/AsyncImagePainter;Lkotlin/coroutines/Continuation;)V -HPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$2;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$2;->invoke(Lcoil3/compose/AsyncImagePainter$Input;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; -HPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$2;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; -Lcoil3/compose/AsyncImagePainter$onRemembered$1$1$3; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$3;->(Lcoil3/compose/AsyncImagePainter;)V -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$3;->emit(Lcoil3/compose/AsyncImagePainter$State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$1$3;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +Lcoil3/compose/AsyncImagePainter$onRemembered$1$2; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2;->(Lcoil3/compose/AsyncImagePainter;Lkotlin/coroutines/Continuation;)V +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2;->access$invokeSuspend$updateState(Lcoil3/compose/AsyncImagePainter;Lcoil3/compose/AsyncImagePainter$State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2;->invokeSuspend$updateState(Lcoil3/compose/AsyncImagePainter;Lcoil3/compose/AsyncImagePainter$State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +HPLcoil3/compose/AsyncImagePainter$onRemembered$1$2;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; +Lcoil3/compose/AsyncImagePainter$onRemembered$1$2$1; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$1;->(Lcoil3/compose/AsyncImagePainter;Lkotlin/coroutines/Continuation;)V +HPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$1;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$1;->invoke(Lcoil3/compose/AsyncImagePainter$Input;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$1;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; +HPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; +Lcoil3/compose/AsyncImagePainter$onRemembered$1$2$2; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$2;->(Lcoil3/compose/AsyncImagePainter;)V +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$2;->emit(Lcoil3/compose/AsyncImagePainter$State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +HSPLcoil3/compose/AsyncImagePainter$onRemembered$1$2$2;->emit(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; Lcoil3/compose/AsyncImagePainter$updateRequest$$inlined$target$default$1; HSPLcoil3/compose/AsyncImagePainter$updateRequest$$inlined$target$default$1;->(Lcoil3/request/ImageRequest;Lcoil3/compose/AsyncImagePainter;)V HPLcoil3/compose/AsyncImagePainter$updateRequest$$inlined$target$default$1;->onStart(Lcoil3/Image;)V @@ -189,7 +189,9 @@ HSPLcoil3/compose/internal/CrossfadePainter;->setInvalidateTick(I)V Lcoil3/compose/internal/UtilsKt; HSPLcoil3/compose/internal/UtilsKt;->$r8$lambda$DWgX8zB5UP28SEDzF0YMQUhwIG4(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/compose/AsyncImagePainter$State;)Lkotlin/Unit; HSPLcoil3/compose/internal/UtilsKt;->$r8$lambda$u7X2A7DhL8n_2ziBl217zYQqpuc(Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/ui/graphics/painter/Painter;Lcoil3/compose/AsyncImagePainter$State;)Lcoil3/compose/AsyncImagePainter$State; +HSPLcoil3/compose/internal/UtilsKt;->()V HSPLcoil3/compose/internal/UtilsKt;->contentDescription(Landroidx/compose/ui/Modifier;Ljava/lang/String;)Landroidx/compose/ui/Modifier; +HSPLcoil3/compose/internal/UtilsKt;->getSafeImmediateMainDispatcher()Lkotlin/coroutines/CoroutineContext; HPLcoil3/compose/internal/UtilsKt;->onStateOf$lambda$5(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/compose/AsyncImagePainter$State;)Lkotlin/Unit; HSPLcoil3/compose/internal/UtilsKt;->onStateOf(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1; HSPLcoil3/compose/internal/UtilsKt;->requestOf(Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Lcoil3/request/ImageRequest; diff --git a/coil-core/src/androidMain/baseline-prof.txt b/coil-core/src/androidMain/baseline-prof.txt index 2ad6d56628..0ea1326114 100644 --- a/coil-core/src/androidMain/baseline-prof.txt +++ b/coil-core/src/androidMain/baseline-prof.txt @@ -395,7 +395,7 @@ HSPLcoil3/intercept/EngineInterceptor;->access$fetch(Lcoil3/intercept/EngineInte HSPLcoil3/intercept/EngineInterceptor;->access$getMemoryCacheService$p(Lcoil3/intercept/EngineInterceptor;)Lcoil3/memory/MemoryCacheService; HSPLcoil3/intercept/EngineInterceptor;->access$getSystemCallbacks$p(Lcoil3/intercept/EngineInterceptor;)Lcoil3/util/SystemCallbacks; HSPLcoil3/intercept/EngineInterceptor;->decode(Lcoil3/fetch/SourceFetchResult;Lcoil3/ComponentRegistry;Lcoil3/request/ImageRequest;Ljava/lang/Object;Lcoil3/request/Options;Lcoil3/EventListener;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -HPLcoil3/intercept/EngineInterceptor;->execute(Lcoil3/request/ImageRequest;Ljava/lang/Object;Lcoil3/request/Options;Lcoil3/EventListener;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +HSPLcoil3/intercept/EngineInterceptor;->execute(Lcoil3/request/ImageRequest;Ljava/lang/Object;Lcoil3/request/Options;Lcoil3/EventListener;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HSPLcoil3/intercept/EngineInterceptor;->fetch(Lcoil3/ComponentRegistry;Lcoil3/request/ImageRequest;Ljava/lang/Object;Lcoil3/request/Options;Lcoil3/EventListener;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; HPLcoil3/intercept/EngineInterceptor;->intercept(Lcoil3/intercept/Interceptor$Chain;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; Lcoil3/intercept/EngineInterceptor$Companion; @@ -573,17 +573,17 @@ HPLcoil3/request/ImageRequest;->(Landroid/content/Context;Ljava/lang/Objec HSPLcoil3/request/ImageRequest;->(Landroid/content/Context;Ljava/lang/Object;Lcoil3/target/Target;Lcoil3/request/ImageRequest$Listener;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Lokio/FileSystem;Lkotlin/Pair;Lcoil3/decode/Decoder$Factory;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lcoil3/memory/MemoryCache$Key;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/size/SizeResolver;Lcoil3/size/Scale;Lcoil3/size/Precision;Lcoil3/Extras;Lcoil3/request/ImageRequest$Defined;Lcoil3/request/ImageRequest$Defaults;Lkotlin/jvm/internal/DefaultConstructorMarker;)V HSPLcoil3/request/ImageRequest;->getContext()Landroid/content/Context; HSPLcoil3/request/ImageRequest;->getData()Ljava/lang/Object; -HSPLcoil3/request/ImageRequest;->getDecoderDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest;->getDecoderCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest;->getDecoderFactory()Lcoil3/decode/Decoder$Factory; HPLcoil3/request/ImageRequest;->getDefaults()Lcoil3/request/ImageRequest$Defaults; HPLcoil3/request/ImageRequest;->getDefined()Lcoil3/request/ImageRequest$Defined; HSPLcoil3/request/ImageRequest;->getDiskCacheKey()Ljava/lang/String; HSPLcoil3/request/ImageRequest;->getDiskCachePolicy()Lcoil3/request/CachePolicy; HPLcoil3/request/ImageRequest;->getExtras()Lcoil3/Extras; -HSPLcoil3/request/ImageRequest;->getFetcherDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest;->getFetcherCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest;->getFetcherFactory()Lkotlin/Pair; HSPLcoil3/request/ImageRequest;->getFileSystem()Lokio/FileSystem; -HSPLcoil3/request/ImageRequest;->getInterceptorDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest;->getInterceptorCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest;->getListener()Lcoil3/request/ImageRequest$Listener; HSPLcoil3/request/ImageRequest;->getMemoryCacheKey()Ljava/lang/String; HSPLcoil3/request/ImageRequest;->getMemoryCacheKeyExtras()Ljava/util/Map; @@ -614,12 +614,12 @@ HSPLcoil3/request/ImageRequest$Defaults;->(Lokio/FileSystem;Lkotlin/corout HSPLcoil3/request/ImageRequest$Defaults;->(Lokio/FileSystem;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/size/SizeResolver;Lcoil3/size/Scale;Lcoil3/size/Precision;Lcoil3/Extras;ILkotlin/jvm/internal/DefaultConstructorMarker;)V HSPLcoil3/request/ImageRequest$Defaults;->copy$default(Lcoil3/request/ImageRequest$Defaults;Lokio/FileSystem;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/size/Precision;Lcoil3/Extras;ILjava/lang/Object;)Lcoil3/request/ImageRequest$Defaults; HSPLcoil3/request/ImageRequest$Defaults;->copy(Lokio/FileSystem;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/size/Precision;Lcoil3/Extras;)Lcoil3/request/ImageRequest$Defaults; -HSPLcoil3/request/ImageRequest$Defaults;->getDecoderDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest$Defaults;->getDecoderCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest$Defaults;->getDiskCachePolicy()Lcoil3/request/CachePolicy; HSPLcoil3/request/ImageRequest$Defaults;->getExtras()Lcoil3/Extras; -HSPLcoil3/request/ImageRequest$Defaults;->getFetcherDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest$Defaults;->getFetcherCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest$Defaults;->getFileSystem()Lokio/FileSystem; -HSPLcoil3/request/ImageRequest$Defaults;->getInterceptorDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest$Defaults;->getInterceptorCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest$Defaults;->getMemoryCachePolicy()Lcoil3/request/CachePolicy; HSPLcoil3/request/ImageRequest$Defaults;->getNetworkCachePolicy()Lcoil3/request/CachePolicy; HSPLcoil3/request/ImageRequest$Defaults;->getPlaceholderFactory()Lkotlin/jvm/functions/Function1; @@ -631,13 +631,13 @@ HSPLcoil3/request/ImageRequest$Defaults$Companion;->()V HSPLcoil3/request/ImageRequest$Defaults$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V Lcoil3/request/ImageRequest$Defined; HPLcoil3/request/ImageRequest$Defined;->(Lokio/FileSystem;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lcoil3/request/CachePolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lcoil3/size/SizeResolver;Lcoil3/size/Scale;Lcoil3/size/Precision;)V -HSPLcoil3/request/ImageRequest$Defined;->getDecoderDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest$Defined;->getDecoderCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest$Defined;->getDiskCachePolicy()Lcoil3/request/CachePolicy; HSPLcoil3/request/ImageRequest$Defined;->getErrorFactory()Lkotlin/jvm/functions/Function1; HSPLcoil3/request/ImageRequest$Defined;->getFallbackFactory()Lkotlin/jvm/functions/Function1; -HSPLcoil3/request/ImageRequest$Defined;->getFetcherDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest$Defined;->getFetcherCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest$Defined;->getFileSystem()Lokio/FileSystem; -HSPLcoil3/request/ImageRequest$Defined;->getInterceptorDispatcher()Lkotlin/coroutines/CoroutineContext; +HSPLcoil3/request/ImageRequest$Defined;->getInterceptorCoroutineContext()Lkotlin/coroutines/CoroutineContext; HSPLcoil3/request/ImageRequest$Defined;->getMemoryCachePolicy()Lcoil3/request/CachePolicy; HSPLcoil3/request/ImageRequest$Defined;->getNetworkCachePolicy()Lcoil3/request/CachePolicy; HSPLcoil3/request/ImageRequest$Defined;->getPlaceholderFactory()Lkotlin/jvm/functions/Function1; @@ -649,7 +649,7 @@ Lcoil3/request/ImageRequestsKt; HSPLcoil3/request/ImageRequestsKt;->()V HSPLcoil3/request/ImageRequestsKt;->crossfade(Lcoil3/ImageLoader$Builder;I)Lcoil3/ImageLoader$Builder; HPLcoil3/request/ImageRequestsKt;->getAllowHardware(Lcoil3/request/ImageRequest;)Z -HSPLcoil3/request/ImageRequestsKt;->getAllowRgb565(Lcoil3/request/ImageRequest;)Z +HPLcoil3/request/ImageRequestsKt;->getAllowRgb565(Lcoil3/request/ImageRequest;)Z HSPLcoil3/request/ImageRequestsKt;->getAllowRgb565(Lcoil3/request/Options;)Z HSPLcoil3/request/ImageRequestsKt;->getBitmapConfig(Lcoil3/request/ImageRequest;)Landroid/graphics/Bitmap$Config; HSPLcoil3/request/ImageRequestsKt;->getBitmapConfig(Lcoil3/request/Options;)Landroid/graphics/Bitmap$Config; diff --git a/docs/upgrading_to_coil3.md b/docs/upgrading_to_coil3.md index 63137815d0..75aab5bf7d 100644 --- a/docs/upgrading_to_coil3.md +++ b/docs/upgrading_to_coil3.md @@ -33,6 +33,9 @@ The `coil-gif` and `coil-video` artifacts continue to be Android-only as they re The `coil-compose` artifact's APIs are mostly unchanged. You can continue using `AsyncImage`, `SubcomposeAsyncImage`, and `rememberAsyncImagePainter` the same way as with Coil 2.x. Additionally, this methods have been updated to be [restartable and skippable](https://developer.android.com/jetpack/compose/performance/stability) which should improve their performance. +!!! Note + If you use Coil on a JVM (non-Android) platform, you should add a dependency on a [coroutines main dispatcher](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html). On desktop you likely want to import `org.jetbrains.kotlinx:kotlinx-coroutines-swing`. If it's not imported then `ImageRequest`s won't be dispatched immediately and will have one frame of delay before setting the `ImageRequest.placeholder` or resolving from the memory cache. + ## Network Images **IMPORTANT** Coil's network image support was extracted out of `coil-core`. To load images from a network URL in Coil 3.0 you'll need to import a separate artifact, either: diff --git a/gradle.properties b/gradle.properties index f917397a5e..5db8961b16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -31,7 +31,7 @@ SONATYPE_HOST=DEFAULT RELEASE_SIGNING_ENABLED=true POM_GROUP_ID=io.coil-kt.coil3 -POM_VERSION=3.0.0-SNAPSHOT +POM_VERSION=3.0.0-alpha08 POM_DESCRIPTION=An image loading library for Android and Compose Multiplatform. POM_INCEPTION_YEAR=2019