Use Compose WebGL render targets - #1114
Draft
sargunv wants to merge 6 commits into
Draft
Conversation
sargunv
had a problem deploying
to
cloudflare-pages
August 26, 2026 20:34 — with
GitHub Actions
Failure
This was referenced Aug 26, 2026
eymar
pushed a commit
to JetBrains/compose-multiplatform-core
that referenced
this pull request
Aug 27, 2026
Fix `WebGLRenderTarget` rendering after its size changes. `Image.adoptTextureFrom` transfers ownership of the WebGL texture to Skia, so closing the old image deletes that texture. The previous resize path then tried to allocate storage on the deleted texture, which left the framebuffer incomplete. This change creates a texture for each size generation and releases the previous texture through one path after notifying borrowers. PR #3323 and its Skiko update are now on `jb-main`. This PR is the focused resize follow-up. ## Testing In this repo: - `./gradlew :compose:ui:ui:jsBrowserTest --no-daemon --no-configuration-cache` - `./gradlew :mpp:publishComposeJbToMavenLocal -Pcompose.platforms=web -Pjetbrains.publication.libraries=COMPOSE --no-daemon --no-configuration-cache` In maplibre/maplibre-compose#1114: - MapLibre Compose demo startup and resize in Chromium, Safari, and Firefox. - MapLibre Compose JS browser suite: 204 tests, no failures or skips. ## Release Notes N/A
sargunv
temporarily deployed
to
cloudflare-pages
August 27, 2026 19:26 — with
GitHub Actions
Inactive
sargunv
had a problem deploying
to
cloudflare-pages
August 27, 2026 21:03 — with
GitHub Actions
Error
sargunv
force-pushed
the
codex/integrate-compose-webgl-render-target
branch
from
August 27, 2026 21:11
b1eb9e5 to
2e75565
Compare
sargunv
temporarily deployed
to
cloudflare-pages
August 27, 2026 21:12 — with
GitHub Actions
Inactive
sargunv
temporarily deployed
to
cloudflare-pages
August 27, 2026 23:52 — with
GitHub Actions
Inactive
sargunv
temporarily deployed
to
cloudflare-pages
August 28, 2026 00:30 — with
GitHub Actions
Inactive
sargunv
temporarily deployed
to
cloudflare-pages
August 28, 2026 00:48 — with
GitHub Actions
Inactive
cursor
Bot
force-pushed
the
codex/integrate-compose-webgl-render-target
branch
from
August 29, 2026 04:03
3173bed to
3044129
Compare
The mutable 1.12.10-alpha01+snapshot.default pin can be replaced: JetBrains now publishes +dev4710, which includes WebGLRenderTarget from Compose #3323 and the resize fix from #3344. Co-authored-by: github.boned427 <github.boned427@passmail.net>
The 1.12.10-alpha01+dev4710 iOS metadata still links against Xcode_26.2_Universal.app, which is not installed on the macos-26 runner. Co-authored-by: github.boned427 <github.boned427@passmail.net>
sargunv
force-pushed
the
codex/integrate-compose-webgl-render-target
branch
from
September 7, 2026 08:34
a83ebc8 to
3d3cc60
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Uses Compose UI's
WebGLRenderTargetinstead of the browser Skiko/Emscripten bridge. MapLibre keeps framebuffer sizing, repaint scheduling, and sampler cleanup; Compose owns the target and restores its graphics state.The pinned Compose
1.12.10-alpha01+dev4710build includes the required API and resize fix. Its Skiko 0.152.0-alpha02 runtime also requires the desktop host to read GPU contexts from backend redrawers. The Windows host verifies its native device offsets against that version (resolves #1312).The branch is updated for current main's initialization, logging, test fixtures, and CI tiers. GPU tests exercise MapLibre's framebuffer behavior without retaining a test-only copy of the removed texture bridge. The shared-image composition test now initializes a Compose graphics host.
Validation
mise run test:js,mise run test:desktopon macOS, andmise run checkpass. The browser compile used a local 6 GB Kotlin daemon heap and reduced build concurrency after exhausting the default 2 GB heap. The desktop suite reports seven skipped tests. The JS demo renders through shrinking and growing Chromium viewports without page errors.CI is pending on the updated head. Full platform coverage is requested because the revised Skiko native device layout and redrawer integration affect Windows ARM64 and Linux ARM64 as well as the default desktop variants.
Release dependency
Remains a draft for a future release. The Compose development build includes upstream #3323 and #3344; the release gate remains a non-prerelease Compose version containing the required APIs. Kotlin/Wasm support is stacked in #1081.
AI assistance
OpenAI Codex (GPT-6) implemented, rebased, reviewed, and validated the change under human direction.