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 }}
This repository was archived by the owner on May 15, 2024. It is now read-only.
The UWP Screenshot implementation has a bug where under certain conditions the content of the ScreenshotResult can be lost before being read as a stream. The RenderTargetBitmap docs solution is to call RenderTarget again, which would in effect take a screenshot at a later time. To prevent random losses of UWP screenshots we would have to store something else than a RenderTargetBitmap.
The contents of a RenderTargetBitmap can be lost in rare cases because of interaction with other lower-level systems, for example if the video driver is reset as part of a recovery (see Timeout Detection and Recovery (TDR)). If that happens, the CompositionTarget.SurfaceContentsLost event will fire. To account for this case and similar info-loss cases, apps should listen for the CompositionTarget.SurfaceContentsLost event and re-render the contents of a RenderTargetBitmap by calling RenderAsync again.
Description
The UWP Screenshot implementation has a bug where under certain conditions the content of the ScreenshotResult can be lost before being read as a stream. The RenderTargetBitmap docs solution is to call RenderTarget again, which would in effect take a screenshot at a later time. To prevent random losses of UWP screenshots we would have to store something else than a RenderTargetBitmap.
Expected Behavior
Bitmap is not lost after graphic driver reset
Actual Behavior
Bitmap is lost
Basic Information