From 6e43880e15d86b3c059280d7587fc1da2bb7be23 Mon Sep 17 00:00:00 2001 From: Chris Banes Date: Tue, 5 Nov 2024 14:35:50 +0000 Subject: [PATCH] Changing to 1.0.0 --- docs/faq.md | 6 +++--- docs/index.md | 6 +++--- docs/{migrating-0.9.md => migrating-1.0.md} | 16 ++++------------ docs/performance.md | 8 ++++---- gradle.properties | 2 +- 5 files changed, 15 insertions(+), 23 deletions(-) rename docs/{migrating-0.9.md => migrating-1.0.md} (81%) diff --git a/docs/faq.md b/docs/faq.md index 67b534ae..c5890a15 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -11,15 +11,15 @@ Ignoring that though... ## Are the blur implementations the same across different platforms? -In v0.9 onwards, all platforms use the same implementation (mostly). +In v1.0 onwards, all platforms use the same implementation (mostly). -In older versions of Haze (older than v0.9), the Android implementation was always built upon [RenderNode][rendernode] and [RenderEffect][rendereffect]. In Compose 1.7.0, we now have access to new GraphicsLayer APIs, which are similar to [RenderNode][rendernode], but available in `commonMain` in Compose Multiplatform. +In older versions of Haze (older than v1.0), the Android implementation was always built upon [RenderNode][rendernode] and [RenderEffect][rendereffect]. In Compose 1.7.0, we now have access to new GraphicsLayer APIs, which are similar to [RenderNode][rendernode], but available in `commonMain` in Compose Multiplatform. The migration to [GraphicsLayer][graphicslayer] has resulted in Haze now having a single implementation across all platforms, based on the previous Android implementation. This will help minimize platform differences, and bugs. It goes further though. In v0.7.x and older, Haze is all 'smoke and mirrors'. It draws all of the blurred areas in the `haze` layout node. The `hazeChild` nodes just updates the size, shape, etc, which the `haze` modifier reads, to know where to draw blurred. -With the adoption of [GraphicsLayer][graphicslayer]s, we now have a way to pass 'drawn' content around, meaning that we are no longer bound by the previous restrictions. v0.9 contains a re-written drawing pipeline, where the blurred content is drawn by the `hazeChild`, not the parent. The parent `haze` is now only responsible for drawing the background content into a graphics layer, and putting it somewhere for the children to access. +With the adoption of [GraphicsLayer][graphicslayer]s, we now have a way to pass 'drawn' content around, meaning that we are no longer bound by the previous restrictions. v1.0 contains a re-written drawing pipeline, where the blurred content is drawn by the `hazeChild`, not the parent. The parent `haze` is now only responsible for drawing the background content into a graphics layer, and putting it somewhere for the children to access. This fixes a number of long-known issues on Haze, where all were caused by the fact that the blurred area wasn't drawn by the child. diff --git a/docs/index.md b/docs/index.md index 972822d4..9919c96e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,10 +18,10 @@ You can also see it in action in the [Tivi app](https://github.com/chrisbanes/ti ## Versions -There are currently 2 different versions available: 0.7.x (stable) and 0.9.x (pre-release). +There are currently 2 different versions available: 0.7.x (stable) and 1.0.x (pre-release). -The 0.9.x release depends on Compose Multiplatform 1.7.0, currently pre-release, meaning that we need to wait for that to go -stable before Haze can go stable. The 0.9.x release also contains a near full re-write of how Haze works underneath. More information can be found on the [Migrating to 0.9](migrating-0.9.md) page. +The 1.0.x release depends on Compose Multiplatform 1.7.0, currently pre-release, meaning that we need to wait for that to go +stable before Haze can go stable. The 1.0.x release also contains a near full re-write of how Haze works underneath. More information can be found on the [Migrating to 1.0](migrating-1.0.md) page. ## Download diff --git a/docs/migrating-0.9.md b/docs/migrating-1.0.md similarity index 81% rename from docs/migrating-0.9.md rename to docs/migrating-1.0.md index e1bc1025..019cf0cd 100644 --- a/docs/migrating-0.9.md +++ b/docs/migrating-1.0.md @@ -1,14 +1,6 @@ -The 0.9 version contains a full re-write (actually more of a refactor) of Haze. It uses Compose Mutliplatform 1.7.0 (currently pre-release), meaning that we now have access to some new and exciting APIs. - -!!! warning "Should I use v0.9 pre-release?" - - I think that all depends on your appetite for prerelease software. Haze itself is now much simpler than ever before, and most of the complexity is now in GraphicsLayer. On Android, we're using the latest Jetpack Compose 1.7.x stable versions. If you're only using Haze on Android, go for it. - - On other platforms, Compose Multiplatform is at 1.7.0-rc01, so not stable, but nearly there. - ## Changes -Here's a list of known changes in v0.9.x. There may be others, so please file issues if you encounter other unexpected changes. +Here's a list of known changes in v1.0.x. There may be others, so please file issues if you encounter other unexpected changes. ### Functional changes @@ -38,7 +30,7 @@ As we're now using a common implementation on all platforms, the Skia-backed pla #### Default style functionality on Modifier.haze has been moved -- **What:** In previous versions, there was a `style` parameter on `Modifier.haze`, which has been moved in v0.9. +- **What:** In previous versions, there was a `style` parameter on `Modifier.haze`, which has been moved in v1.0. - **Migration:** Use the new [LocalHazeStyle](api/haze/dev.chrisbanes.haze/-local-haze-style.html) composition local instead. - **Why:** Composition locals are used throughout styling frameworks, so this is a better API going forward. @@ -50,7 +42,7 @@ As we're now using a common implementation on all platforms, the Skia-backed pla ## Why have these changes been made? -Below we'll go through some of the background of the changes in v0.9. You don't need to know this stuff, but it might be interesting for some. +Below we'll go through some of the background of the changes in v1.0. You don't need to know this stuff, but it might be interesting for some. ### GraphicsLayers @@ -62,6 +54,6 @@ This has resulted in Haze now having a single implementation across all platform In v0.7 and older, Haze is all 'smoke and mirrors'. It draws all of the blurred areas in the `haze` layout node. The `hazeChild` nodes just update the size, shape, etc, which the `haze` modifier reads, to know where to draw. -With the adoption of GraphicsLayers, we now have a way to pass 'drawn' content around, meaning that we are no longer bound by the restraints of before. v0.9 contains a re-written drawing pipeline, where the blurred content is drawn by the `hazeChild`, not the parent. The parent `haze` is now only responsible for drawing the background content into a graphics layer, and putting it somewhere for the children to access. +With the adoption of GraphicsLayers, we now have a way to pass 'drawn' content around, meaning that we are no longer bound by the restraints of before. v1.0 contains a re-written drawing pipeline, where the blurred content is drawn by the `hazeChild`, not the parent. The parent `haze` is now only responsible for drawing the background content into a graphics layer, and putting it somewhere for the children to access. This fixes a number of long-known issues on Haze, where all were caused by the fact that the blurred area wasn't drawn by the child. diff --git a/docs/performance.md b/docs/performance.md index f2d0deb9..e1d8ce38 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -20,9 +20,9 @@ We currently have 4 benchmark scenarios, each of them is one of the samples in t As with all benchmark tests, the results are only true for the exact things being tested. Using Haze in your own applications may result in different performance characteristics, so it is wise to write your own performance tests to validate the impact to your apps. -#### 0.7.3 vs 0.9.0 +#### 0.7.3 vs 1.0.0 -| Test | 0.7.3 | 0.9.0 | Difference | +| Test | 0.7.3 | 1.0.0 | Difference | | ------------- | ---------- | -----------| ------------ | | Scaffold | 6.9 ms | 6.4 ms | :material-trending-down: -7% | | Scaffold (progressive) (SDK 32) | - | 14.8 ms | - | @@ -30,11 +30,11 @@ As with all benchmark tests, the results are only true for the exact things bein | Images List | 6.9 ms | 6.8 ms | :material-trending-down: -1% | | Credit Card | 4.9 ms | 4.7 ms | :material-trending-down: -4% | -#### 0.9.0 vs baseline +#### 1.0.0 vs baseline We can also measure the rough cost of using Haze in the same samples. Here we've ran the same tests, but with Haze being disabled: -| Test | 0.9.0 (disabled) | 0.9.0 | Difference | +| Test | 1.0.0 (disabled) | 1.0.0 | Difference | | ------------- | ------------------| -----------| ------------ | | Scaffold | 4.9 ms | 6.4 ms | +31% | | Images List | 4.6 ms | 6.8 ms | +48% | diff --git a/gradle.properties b/gradle.properties index 687f35c3..9161eb2b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -40,7 +40,7 @@ SONATYPE_HOST=DEFAULT RELEASE_SIGNING_ENABLED=true GROUP=dev.chrisbanes.haze -VERSION_NAME=0.9.0-SNAPSHOT +VERSION_NAME=1.0.0-SNAPSHOT POM_DESCRIPTION=Haze POM_URL=https://github.com/chrisbanes/haze/