Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change trigger_multi_frame_capture() to take &mut self #27

Closed
ebkalderon opened this issue May 18, 2019 · 0 comments · Fixed by #32
Closed

Change trigger_multi_frame_capture() to take &mut self #27

ebkalderon opened this issue May 18, 2019 · 0 comments · Fixed by #32
Labels

Comments

@ebkalderon
Copy link
Owner

ebkalderon commented May 18, 2019

Currently, all of the following capture-related API methods take &mut self:

  1. trigger_capture()
  2. start_frame_capture()
  3. end_frame_capture()

This is because the RenderDoc API used for capturing frames is designed with inherently serial operations (not thread-safe) and need to statically indicate to the compiler and end user alike that unsynchronized internal mutation is occurring. As such, trigger_multi_frame_capture() should take &mut self as well.

This is technically a breaking API change, but it is critical to fix this in order to prevent unsound behavior in future versions. It should be documented in the CHANGELOG.md so users looking to upgrade versions are aware of the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant