You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f443e7c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(imaging): Release the decode of a cancelled requester
A source whose open was superseded while its download or decode was in
flight produced a surface that nothing displayed: ImageSource.Open
dropped a result that arrived after cancellation, and a BitmapImage
requester that was cancelled out of waiting on its own load never saw
what the load produced. Each such surface waited for finalization, so
clicking quickly through large images piled them up.
A result that arrives after cancellation is now released at once, and a
cancelled requester attaches a continuation to its uncached load that
releases the surface it produces. Cached loads are shared and stay the
cache's.
unoplatform#25114
Assert.IsTrue(decoded,$"Pre-condition: the decode must complete (requests {server.RequestCount}, bodies sent {server.BodiesSent}, surfaces {ImageData.CompositionSurfacesCreatedForTesting-createdBefore}, opened {result.IsCompleted})");
194
+
195
+
bitmap.UriSource=null;
196
+
awaitWindowHelper.WaitForIdle();
197
+
198
+
Assert.IsTrue(ImageSource.ReleasedSurfacesForTesting>releasedBefore,"The decoded surface nobody will show must be released");
199
+
Assert.IsFalse(result.IsCompleted,"The cancelled BitmapImage should raise neither ImageOpened nor ImageFailed");
0 commit comments