Skip to content

Impeller: Recreate Vulkan transients on surface size change#185122

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
reinar:upstream/fix_transients_on_resize
Apr 23, 2026
Merged

Impeller: Recreate Vulkan transients on surface size change#185122
auto-submit[bot] merged 5 commits into
flutter:masterfrom
reinar:upstream/fix_transients_on_resize

Conversation

@reinar

@reinar reinar commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #185120

Store transients size and recreate/update if it's not matching.
Also adds a test for this particular case.

Video with the same setup, but with a fix (don't mind black bars while I'm dragging the mouse, my embedder sends resize message only when we're done resizing):

resize_bug_fixed.mp4

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added the engine flutter/engine related. See also e: labels. label Apr 15, 2026
@reinar reinar changed the title Upstream/fix transients on resize Impeller: Recreate Vulkan transients on surface size change Apr 15, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies GPUSurfaceVulkanImpeller to recreate Vulkan transients when the frame size changes, preventing potential rendering issues. It introduces a transients_size_ member to track dimensions and adds a corresponding unit test. A review comment suggests adding documentation to the new private member to align with the Flutter style guide.

Comment thread engine/src/flutter/shell/gpu/gpu_surface_vulkan_impeller.h
@gaaclarke gaaclarke added the CICD Run CI/CD label Apr 21, 2026
gaaclarke
gaaclarke previously approved these changes Apr 21, 2026

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me, @andywolff can you give this another look please?

andywolff
andywolff previously approved these changes Apr 21, 2026

@andywolff andywolff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the fix

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 21, 2026
@gaaclarke gaaclarke added the CICD Run CI/CD label Apr 21, 2026
@gaaclarke

Copy link
Copy Markdown
Member

@reinar I'm not sure why ci.yaml validation has failed. Typically when that fails an update works to flush it out. Merge main did not seem to help in this case. I'd try rebasing against main. I don't have permissions to do that for you.

@reinar

reinar commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@gaaclarke : sure, let me do that. I'll rebase only 3 commits with substance and forcepush to my fork, so it might need reapprovals though.
Thank you and @andywolff for quick review!

@reinar reinar force-pushed the upstream/fix_transients_on_resize branch from ae049d2 to 3c63172 Compare April 21, 2026 18:39
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 21, 2026
@reinar

reinar commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@gaaclarke done, approvals somehow weren't dismissed. Either way, needs your attention for CICD label, thank you!

@gaaclarke gaaclarke added the CICD Run CI/CD label Apr 21, 2026
@reinar reinar changed the base branch from main to master April 21, 2026 18:49
@reinar reinar dismissed stale reviews from gaaclarke and andywolff April 21, 2026 18:49

The base branch was changed.

@gaaclarke

Copy link
Copy Markdown
Member

I think targeting master was the right fix, you may have to push an empty commit now to retrigger it.

@gaaclarke

Copy link
Copy Markdown
Member

nevermind, seems like it picked it up

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@reinar

reinar commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

now we need reapprovals for sure :) this seems to be the reason #169787
I was merging to main while everyone else is merging to master, however I'm pretty sure tree hygeine doc was talking about main as a default branch... either way, will try it like this

@gaaclarke gaaclarke requested a review from andywolff April 21, 2026 18:52
@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 3c63172be648e915eb927d5f167215a89c1b504a, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 22, 2026
@gaaclarke gaaclarke added the CICD Run CI/CD label Apr 22, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 22, 2026
@auto-submit

auto-submit Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/185122, because - The status or check suite Windows windows_host_engine_test has failed. Please fix the issues identified (or deflake) before re-applying this label.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 22, 2026
@gaaclarke gaaclarke added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Apr 22, 2026
@gaaclarke

Copy link
Copy Markdown
Member

When a single test flakes out like that I can retrigger them. I didn't look at the log to verify it was a flake but just fyi.

@reinar

reinar commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

@gaaclarke : I've looked at the logs before merging master and it wasn't a flake, there were 3 tests failed from windows test target and they were tried 2 times, but around the time you merged the master previously we had a red tree, maybe this collided somehow.

Luckily had a tab open
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8683794656834126593/+/u/test:_Host_Tests_for_host_debug_test/stdout

exit code 0xC0000142 - somehow needed admin rights on init. I don't have much idea on flutter's ci infrastructure and if it's a flake or not, but this is definitely not something I've introduced. Last build before the cicd label dance was green.

If it will fail again, I'll look into it deeper.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 22, 2026
@auto-submit

auto-submit Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/185122, because - The status or check suite Linux windows_android_aot_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@reinar

reinar commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author
[E2026-04-22T14:15:18.640646-07:00 6892 0 stack.go:35] error: failed to download files: context canceled

failed to download files: context canceled
goroutine 1 [running]:
go.chromium.org/luci/client/cmd/cas/casimpl.(*downloadRun).doDownload(0xc00035d080, {0x7ff71d434c40?, 0xc000364fc0?})
	go.chromium.org/luci/client/cmd/cas/casimpl/download.go:518 +0x1cee
go.chromium.org/luci/client/cmd/cas/casimpl.(*downloadRun).Run(0xc00035d080, {0x7ff71d4379c8, 0xc0001298b0}, {0xc0000500f0, 0x0, 0x0}, 0xc00008a038?)
	go.chromium.org/luci/client/cmd/cas/casimpl/download.go:577 +0x2ab
github.com/maruel/subcommands.Run({0x7ff71d4379c8, 0xc0001298b0}, {0x0, 0x0, 0x0})
	github.com/maruel/subcommands@v1.1.1/subcommands.go:395 +0x565
main.main()
	go.chromium.org/luci/client/cmd/cas/main.go:95 +0x3b
cas: failed to download files: context canceled

io failure, test didn't even start. I won't try anything, if maintainers have a way to retrigger individual job it'd be better.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 22, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 22, 2026
@auto-submit

auto-submit Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/185122, because - The status or check suite Linux linux_fuchsia_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@reinar

reinar commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

@gaaclarke : CI is green, can you please add autosubmit?

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 23, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 23, 2026
Merged via the queue into flutter:master with commit 488f002 Apr 23, 2026
212 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 23, 2026
@reinar reinar deleted the upstream/fix_transients_on_resize branch April 24, 2026 08:06
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 24, 2026
Roll Flutter from 5e4f16931847 to aeb96234de86 (42 revisions)

flutter/flutter@5e4f169...aeb9623

2026-04-24 robert.ancell@canonical.com Fix leak on error case (flutter/flutter#185516)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 04c6c369cfd0 to 1c9b0b9141e9 (2 revisions) (flutter/flutter#185529)
2026-04-24 engine-flutter-autoroll@skia.org Roll Dart SDK from f386b11262f6 to c26627715892 (1 revision) (flutter/flutter#185526)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 290a056fcd0e to 04c6c369cfd0 (2 revisions) (flutter/flutter#185525)
2026-04-24 chris@bracken.jp [ios] Extract SplashScreenManager from FlutterViewController (flutter/flutter#185405)
2026-04-24 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from j3UCWZhWx7zSl9Asy... to 9fPnyEo9PaNdXtasl... (flutter/flutter#185523)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 4c8bedd3c932 to 290a056fcd0e (1 revision) (flutter/flutter#185518)
2026-04-24 engine-flutter-autoroll@skia.org Roll Dart SDK from 70665fc3fd2e to f386b11262f6 (2 revisions) (flutter/flutter#185512)
2026-04-24 97480502+b-luk@users.noreply.github.com Handle hairline strokes in UberSDF (flutter/flutter#184895)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from ea20c73ac72c to 4c8bedd3c932 (3 revisions) (flutter/flutter#185509)
2026-04-24 58529443+srujzs@users.noreply.github.com Use relative path for reloadedSourcesUri and reloaded modules (flutter/flutter#184598)
2026-04-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Run all flutter/flutter macOS tests using Xcode 26 and iOS 26 simulator (#185431)" (flutter/flutter#185513)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from e8d00d634c22 to ea20c73ac72c (8 revisions) (flutter/flutter#185500)
2026-04-23 okorohelijah@google.com Run all flutter/flutter macOS tests using Xcode 26 and iOS 26 simulator (flutter/flutter#185431)
2026-04-23 rmolivares@renzo-olivares.dev update team-text-input pr triage link to filter out "waiting for response" label (flutter/flutter#185499)
2026-04-23 jason-simmons@users.noreply.github.com Check for overflow when computing the pixel buffer size for an animated PNG frame (flutter/flutter#185442)
2026-04-23 reinar@crypt.ws Impeller: Recreate Vulkan transients on surface size change (flutter/flutter#185122)
2026-04-23 matt.kosarek@canonical.com Updating the windowing API for sized to content regular and dialog windows + removing the decorated flag (flutter/flutter#184977)
2026-04-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 634991935e9a to 70665fc3fd2e (2 revisions) (flutter/flutter#185488)
2026-04-23 louisehsu@google.com Updating ios triage link (flutter/flutter#185437)
2026-04-23 34871572+gmackall@users.noreply.github.com Revert "Preprovision Android NDK for flavored builds and reuse matchi… (flutter/flutter#185439)
2026-04-23 1961493+harryterkelsen@users.noreply.github.com fix(web): Fix LateInitializationError in CkSurface and SkwasmSurface (flutter/flutter#185116)
2026-04-23 1961493+harryterkelsen@users.noreply.github.com [web] Implement stepped image downscaling for CanvasKit and Skwasm (flutter/flutter#184741)
2026-04-23 30870216+gaaclarke@users.noreply.github.com Made wide_gamut_macos only run on arm64 machines (flutter/flutter#185486)
2026-04-23 chris@bracken.jp [ios] Update documentation for FlutterAppDelegate.pluginRegistrant (flutter/flutter#185201)
2026-04-23 engine-flutter-autoroll@skia.org Roll Dart SDK from bdf48933f3cf to 634991935e9a (1 revision) (flutter/flutter#185462)
2026-04-23 engine-flutter-autoroll@skia.org Roll Skia from 5fe6162546b1 to e8d00d634c22 (3 revisions) (flutter/flutter#185459)
2026-04-23 engine-flutter-autoroll@skia.org Roll Skia from 0049c5d91b08 to 5fe6162546b1 (1 revision) (flutter/flutter#185455)
2026-04-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 9648f446f131 to bdf48933f3cf (19 revisions) (flutter/flutter#185451)
2026-04-23 engine-flutter-autoroll@skia.org Roll Skia from 11640d1cbc5c to 0049c5d91b08 (11 revisions) (flutter/flutter#185453)
2026-04-23 ishaquehassan@gmail.com Add disposal guidance to CurvedAnimation and CurveTween docs (flutter/flutter#184569)
2026-04-23 ishaquehassan@gmail.com Add `clipBehavior` parameter to `AnimatedCrossFade` (flutter/flutter#184545)
2026-04-23 rmacnak@google.com [fuchsia] Ask for only VMEX, not ambient-replace-as-executable. (flutter/flutter#185099)
2026-04-23 47866232+chunhtai@users.noreply.github.com Unify SemanticUpdateBuilder API for web and non-web (flutter/flutter#185433)
2026-04-22 68919043+Istiak-Ahmed78@users.noreply.github.com Fix ImageInfo.isCloneOf tests by moving async work to setUp (flutter/flutter#185254)
2026-04-22 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from UdpQnaP5eSaDZd3-i... to j3UCWZhWx7zSl9Asy... (flutter/flutter#185438)
2026-04-22 30870216+gaaclarke@users.noreply.github.com Adds script to run malioc locally (flutter/flutter#185371)
2026-04-22 47866232+chunhtai@users.noreply.github.com Add await mechanism to setClipboard in android_semantics_integration test (flutter/flutter#185428)
2026-04-22 43054281+camsim99@users.noreply.github.com Add ability to pass flags to `et run` (flutter/flutter#185109)
2026-04-22 47866232+chunhtai@users.noreply.github.com Add more guidelines for code review bot (flutter/flutter#185367)
2026-04-22 danny@tuppeny.com Roll pub packages (flutter/flutter#185274)
2026-04-22 saurabhmirajkar000@gmail.com Fix incorrect scale parameter reference in Image constructor docs (flutter/flutter#185403)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
...
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11576)

Roll Flutter from 5e4f16931847 to aeb96234de86 (42 revisions)

flutter/flutter@5e4f169...aeb9623

2026-04-24 robert.ancell@canonical.com Fix leak on error case (flutter/flutter#185516)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 04c6c369cfd0 to 1c9b0b9141e9 (2 revisions) (flutter/flutter#185529)
2026-04-24 engine-flutter-autoroll@skia.org Roll Dart SDK from f386b11262f6 to c26627715892 (1 revision) (flutter/flutter#185526)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 290a056fcd0e to 04c6c369cfd0 (2 revisions) (flutter/flutter#185525)
2026-04-24 chris@bracken.jp [ios] Extract SplashScreenManager from FlutterViewController (flutter/flutter#185405)
2026-04-24 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from j3UCWZhWx7zSl9Asy... to 9fPnyEo9PaNdXtasl... (flutter/flutter#185523)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 4c8bedd3c932 to 290a056fcd0e (1 revision) (flutter/flutter#185518)
2026-04-24 engine-flutter-autoroll@skia.org Roll Dart SDK from 70665fc3fd2e to f386b11262f6 (2 revisions) (flutter/flutter#185512)
2026-04-24 97480502+b-luk@users.noreply.github.com Handle hairline strokes in UberSDF (flutter/flutter#184895)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from ea20c73ac72c to 4c8bedd3c932 (3 revisions) (flutter/flutter#185509)
2026-04-24 58529443+srujzs@users.noreply.github.com Use relative path for reloadedSourcesUri and reloaded modules (flutter/flutter#184598)
2026-04-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Run all flutter/flutter macOS tests using Xcode 26 and iOS 26 simulator (#185431)" (flutter/flutter#185513)
2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from e8d00d634c22 to ea20c73ac72c (8 revisions) (flutter/flutter#185500)
2026-04-23 okorohelijah@google.com Run all flutter/flutter macOS tests using Xcode 26 and iOS 26 simulator (flutter/flutter#185431)
2026-04-23 rmolivares@renzo-olivares.dev update team-text-input pr triage link to filter out "waiting for response" label (flutter/flutter#185499)
2026-04-23 jason-simmons@users.noreply.github.com Check for overflow when computing the pixel buffer size for an animated PNG frame (flutter/flutter#185442)
2026-04-23 reinar@crypt.ws Impeller: Recreate Vulkan transients on surface size change (flutter/flutter#185122)
2026-04-23 matt.kosarek@canonical.com Updating the windowing API for sized to content regular and dialog windows + removing the decorated flag (flutter/flutter#184977)
2026-04-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 634991935e9a to 70665fc3fd2e (2 revisions) (flutter/flutter#185488)
2026-04-23 louisehsu@google.com Updating ios triage link (flutter/flutter#185437)
2026-04-23 34871572+gmackall@users.noreply.github.com Revert "Preprovision Android NDK for flavored builds and reuse matchi… (flutter/flutter#185439)
2026-04-23 1961493+harryterkelsen@users.noreply.github.com fix(web): Fix LateInitializationError in CkSurface and SkwasmSurface (flutter/flutter#185116)
2026-04-23 1961493+harryterkelsen@users.noreply.github.com [web] Implement stepped image downscaling for CanvasKit and Skwasm (flutter/flutter#184741)
2026-04-23 30870216+gaaclarke@users.noreply.github.com Made wide_gamut_macos only run on arm64 machines (flutter/flutter#185486)
2026-04-23 chris@bracken.jp [ios] Update documentation for FlutterAppDelegate.pluginRegistrant (flutter/flutter#185201)
2026-04-23 engine-flutter-autoroll@skia.org Roll Dart SDK from bdf48933f3cf to 634991935e9a (1 revision) (flutter/flutter#185462)
2026-04-23 engine-flutter-autoroll@skia.org Roll Skia from 5fe6162546b1 to e8d00d634c22 (3 revisions) (flutter/flutter#185459)
2026-04-23 engine-flutter-autoroll@skia.org Roll Skia from 0049c5d91b08 to 5fe6162546b1 (1 revision) (flutter/flutter#185455)
2026-04-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 9648f446f131 to bdf48933f3cf (19 revisions) (flutter/flutter#185451)
2026-04-23 engine-flutter-autoroll@skia.org Roll Skia from 11640d1cbc5c to 0049c5d91b08 (11 revisions) (flutter/flutter#185453)
2026-04-23 ishaquehassan@gmail.com Add disposal guidance to CurvedAnimation and CurveTween docs (flutter/flutter#184569)
2026-04-23 ishaquehassan@gmail.com Add `clipBehavior` parameter to `AnimatedCrossFade` (flutter/flutter#184545)
2026-04-23 rmacnak@google.com [fuchsia] Ask for only VMEX, not ambient-replace-as-executable. (flutter/flutter#185099)
2026-04-23 47866232+chunhtai@users.noreply.github.com Unify SemanticUpdateBuilder API for web and non-web (flutter/flutter#185433)
2026-04-22 68919043+Istiak-Ahmed78@users.noreply.github.com Fix ImageInfo.isCloneOf tests by moving async work to setUp (flutter/flutter#185254)
2026-04-22 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from UdpQnaP5eSaDZd3-i... to j3UCWZhWx7zSl9Asy... (flutter/flutter#185438)
2026-04-22 30870216+gaaclarke@users.noreply.github.com Adds script to run malioc locally (flutter/flutter#185371)
2026-04-22 47866232+chunhtai@users.noreply.github.com Add await mechanism to setClipboard in android_semantics_integration test (flutter/flutter#185428)
2026-04-22 43054281+camsim99@users.noreply.github.com Add ability to pass flags to `et run` (flutter/flutter#185109)
2026-04-22 47866232+chunhtai@users.noreply.github.com Add more guidelines for code review bot (flutter/flutter#185367)
2026-04-22 danny@tuppeny.com Roll pub packages (flutter/flutter#185274)
2026-04-22 saurabhmirajkar000@gmail.com Fix incorrect scale parameter reference in Image constructor docs (flutter/flutter#185403)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impeller: Vulkan transients are not recreated on surface size change

4 participants