Visitar URL original
fix(imaging): Don't cache IgnoreImageCache loads (backport #25100) (backport #25911) by mergify[bot] · Pull Request #25912 · unoplatform/uno · GitHub
Skip to content

fix(imaging): Don't cache IgnoreImageCache loads (backport #25100) (backport #25911) - #25912

Merged
agneszitte merged 1 commit into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-25911
Nov 2, 2026
Merged

agneszitte merged 1 commit into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-25911

Conversation

@mergify

@mergify mergify Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: Related to #25098

PR Type:

🐞 Bugfix

What changed? 🚀

Manual backport of #25100 to servicing/6.8, for 6.7 SR3 (part of the fixes for the WebAssembly crashes while scrolling).

  • Before: on Skia, a BitmapImage with CreateOptions="IgnoreImageCache" still went into the static image cache, so its decoded image stayed in memory. An app that shows many large images this way can run out of memory on WebAssembly, and the app terminates.
  • After: images loaded with IgnoreImageCache are no longer kept in the cache, and they never replace a cache entry that other images share.
  • Why not Mergify: on 6.x this code is in BitmapImage.skia.cs, and the test goes under Tests/Windows_UI_Xaml_Media_Imaging. The changed lines are the same as on master.

PR Checklist ✅

Local validation (Skia Desktop, Windows)

Runtime tests on this branch, filtered to Tests.Windows_UI_Xaml_Media_Imaging and Given_Image: 52 of 54 passed, including the new Given_BitmapImage.When_IgnoreImageCache_Then_Not_Added_To_Cache.

  • Given_WriteableBitmap.When_WriteableBitmap_Assigned_With_Data_Present failed on its pixel check. It doesn't use BitmapImage.
  • Given_RenderTargetBitmap.When_Render_Border_GetPixelsAsync was inconclusive: it needs 100% display scaling.

🤖 Generated with Claude Code


This is an automatic backport of pull request #25911 done by [Mergify](https://mergify.com).

`IgnoreImageCache` skipped the lookup in the static `_bitmapImageCache`
but still added its load task to it, so the decoded image was retained
by the cache exactly as if the option were not set. Gate the add (and
the cancellation-removal registration) on the option too, so the image
lives only as long as the `BitmapImage` that produced it and never
replaces an entry other consumers already share.

Fixes #25098

Backport note: on 6.x the code is in BitmapImage.skia.cs and the test
goes under Tests/Windows_UI_Xaml_Media_Imaging. The changed lines are
the same as on master.

(cherry picked from commit 7c1c364)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f6d489c)
@github-actions github-actions Bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Nov 2, 2026
@agneszitte
agneszitte merged commit c28ec75 into release/stable/6.7 Nov 2, 2026
11 of 16 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.7/pr-25911 branch November 2, 2026 03:25
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/skia ✏️ Categorizes an issue or PR as relevant to Skia

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants