Skip to content

Fix WebGL render target resizing - #3344

Merged
Oleksandr Karpovich (eymar) merged 1 commit into
JetBrains:jb-mainfrom
sargunv:codex/fix-webgl-render-target-resize
Aug 27, 2026
Merged

Fix WebGL render target resizing#3344
Oleksandr Karpovich (eymar) merged 1 commit into
JetBrains:jb-mainfrom
sargunv:codex/fix-webgl-render-target-resize

Conversation

@sargunv

@sargunv Sargun Vohra (sargunv) commented Aug 26, 2026

Copy link
Copy Markdown

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

@eymar

Oleksandr Karpovich (eymar) commented Aug 27, 2026

Copy link
Copy Markdown
Member

LGTM!

I'm ready to merge my PR. Since I'm going to squash the commits, would you like to change the target branch to jb-main after I merge my PR? This way your authorship will be preserved.


Looks like I can change the target branch myself. I'll try.

@eymar

Oleksandr Karpovich (eymar) commented Aug 27, 2026

Copy link
Copy Markdown
Member

I see... When I merged my PR, it automatically deleted the branch too which was the target branch of your PR. And that's why your PR got closed too. My bad.

Could you please re-open your PR against jb-main? (The button is inactive for me).


I managed to re-open it. But got merge conflicts now. I'll appreciate your help with them :)

@eymar
Oleksandr Karpovich (eymar) changed the base branch from ok/web-webgl-texture-adoption-demo_plus_api to jb-main August 27, 2026 13:30
@sargunv

Copy link
Copy Markdown
Author

Will do in a bit. Just need to rebase on jb-main and drop the down stack (squashed) commits

@sargunv
Sargun Vohra (sargunv) force-pushed the codex/fix-webgl-render-target-resize branch from e4eddf8 to 39eb351 Compare August 27, 2026 16:35
@eymar

Copy link
Copy Markdown
Member

Marking Release Notes as N/A since it's fixing a new feature which has not been released yet.

@eymar

Copy link
Copy Markdown
Member

Thanks! I tested resize in the CMP webgl demos. Works well!

@eymar
Oleksandr Karpovich (eymar) merged commit dca97b2 into JetBrains:jb-main Aug 27, 2026
16 of 20 checks passed
@sargunv
Sargun Vohra (sargunv) deleted the codex/fix-webgl-render-target-resize branch August 27, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants