Skip to content

Releases

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 29 Nov 03:45

Performance

  • Adaptive downsampling: with BlurQuality.BALANCED (the default) and LOW, large radii are now blurred at a lower resolution, keeping the blur radius in the buffer at 8 px or less (5 px for LOW). The result looks the same, because a blur that strong has no fine detail, but every per-frame cost scales with the buffer: capture, upload, GPU blur and the GLES readback. HIGH and ULTRA keep downsample exactly. On the Android 10 emulator (GLES path), a BlurView update went from 3.5 ms to 1.8–2.0 ms.
  • Unchanged content is not blurred again: the capture is double-buffered and compared with the previous one. When the window redraws for something unrelated (a spinner, a cursor, the surface's own children), the blur, texture upload and readback are skipped. That frame costs 0.04 ms instead of 2.7 ms. New: ViewCapture.lastCaptureChanged.
  • Trace sections: BlurEngine:update, :capture, :blur and :record show up in Perfetto and the Android Studio profiler. They cost nothing when tracing is off.

Fixed

  • BlurSurfaceRenderer.skippedCapture was also true while a backend was still warming up. It now means only what it says: capture was skipped because the blur was a no-op.
  • Device tests on CI emulators (software GL):
    • tests now wait until the blur is drawn by its final renderer instead of a fixed delay;
    • they pin the animation scale to 1 while they run;
    • they take screenshots only once the screen has stopped changing.

Changed

  • Build: publishing plugin com.vanniktech.maven.publish 0.29.0 → 0.34.0. Central Portal deployments are now named io.github.mrsluffy-<version> instead of a random ID. The publishing properties use the plugin's current names: mavenCentralPublishing, mavenCentralAutomaticPublishing and signAllPublications. The published artifacts are unchanged.
  • Releases: only the repository owner can start the publish workflow.

Install

implementation("io.github.mrsluffy:blur-view:1.0.1")     // Android Views
implementation("io.github.mrsluffy:blur-compose:1.0.1")  // Jetpack Compose

blur-showcase-v1.0.1.apk is the demo app (a debug build; Android 10+).

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 08:02

The first stable release. The public API is now frozen under semantic versioning.

Added

  • Liquid glass: GlassStyle (BlurView.glass, Compose glass()). On every API level it adds a rim highlight, gloss and edge shading. On API 33+ it also refracts and disperses color at the rim, using an AGSL RuntimeShader chained after the blur, so it costs no main-thread time.
  • Progressive blur: BlurGradient (BlurView.gradient, Compose gradient), with presets TopToBottom, BottomToTop, LeftToRight and RightToLeft.
  • Multi-layer blur: blur surfaces drawn earlier now appear in the blur of the ones drawn after them, so stacked glass panels show each other. ViewCapture.capture gained an owner parameter for this.
  • blur-showcase: a Compose app that demonstrates the three effects and the BlurView animation API. Its autoplay mode makes recordings repeatable.
  • scripts/record-demo.ps1: records the README screenshots and GIFs from blur-showcase on an emulator or device.
  • License: released under the Apache License 2.0. Every Kotlin, Gradle and XML source file carries the license header. ./gradlew spotlessApply adds it to new files, and spotlessCheck (run in CI) fails if one is missing.
  • Publishing: Maven Central publishing for the 8 library modules under io.github.mrsluffy, each with a sources jar, a Dokka javadoc jar and signed artifacts.
  • API docs: generated with Dokka (./gradlew dokkaHtmlMultiModule).
  • API check: public API snapshots (api/*.api), checked by ./gradlew check.
  • CI: GitHub Actions runs lint, unit tests, the API check and device tests on API 29 and 34. Pushing a v* tag runs the publish workflow.
  • Timing switch for device tests: the instrumentation argument timingAssertions=false turns off frame-rate checks for emulators without GPU acceleration. CI sets it. Correctness checks always run.

Fixed

  • GLES threading: the GLES backend now runs every GL call on one thread that it owns. BlurView creates the backend on a background thread and renders on the main thread, and moving the EGL context between those threads was unreliable. On the Android emulator, a test reproduced three faults:

    • the first render on the second thread failed with GL_INVALID_VALUE;
    • the GL objects broke once the creating thread exited;
    • the main thread paid about 300 ms of one-time GL setup on its first frame, which dropped frames at the start of a GLES animation.

    initialize, render and release still block until their work is done, and the hand-off allocates nothing per frame. GlesThreadingTest covers all three faults.

  • API 29 lint error: RenderEffectBackendFactory, which must be safe to load on API 29 and 30, referenced the API 31 backend class. It now owns the ID constant itself and uses an explicit SDK_INT branch.

Changed

  • RenderEffectBlurBackend.ID is now defined as RenderEffectBackendFactory.ID. The value, "render-effect", is unchanged.

Install

implementation("io.github.mrsluffy:blur-view:1.0.0")     // Android Views
implementation("io.github.mrsluffy:blur-compose:1.0.0")  // Jetpack Compose

blur-showcase-v1.0.0.apk is the demo app (a debug build; Android 10+).