-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a robust way to temporarily end Direct2D drawing. (#578)
#569 solved the issue for the happy path already, but if one of the failure paths of `copy_raw_pixels` would run then the happy path's `begin_draw` method invocation would never happen. This PR adds a simple `DrawRestarter` that ensures drawing gets restarted as it is dropped when execution returns from `copy_raw_pixels`. Similar to a `finally` section in other languages.
- Loading branch information
Showing
2 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters