Skip to content

Commit

Permalink
Fix Memory Leaks
Browse files Browse the repository at this point in the history
- Set `share_wgpu_instances` to `true` in Gyroflow Core.
- Added `kFxPropertyKey_IsThreadSafe` and `kFxPropertyKey_MayRemapTime` just in case. They shouldn't be needed, but the documentation is fairly unclear.
- We now correctly release the base64 data.
- Simplified `renderErrorMessageWithID`.
- We now use a temporary texture to avoid some weird Metal Texture memory leak. This is probably not the best way to do it, but I haven't worked out a better solution yet.
  • Loading branch information
latenitefilms committed Aug 9, 2023
1 parent 4e919a9 commit 483a2e1
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 53 deletions.
20 changes: 16 additions & 4 deletions Source/Frameworks/gyroflow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,23 @@ pub extern "C" fn processFrame(
//---------------------------------------------------------
manager.params.write().framebuffer_inverted = true;

//---------------------------------------------------------
// Set Stabilisation Settings:
//---------------------------------------------------------
// Set the Interpolation:
//---------------------------------------------------------
manager.stabilization.write().interpolation = gyroflow_core::stabilization::Interpolation::Lanczos4;

{
let mut stab = manager.stabilization.write();

//---------------------------------------------------------
// Set the Interpolation:
//---------------------------------------------------------
stab.interpolation = gyroflow_core::stabilization::Interpolation::Lanczos4;

//---------------------------------------------------------
// Share wpgu instances:
//---------------------------------------------------------
stab.share_wgpu_instances = true;
}

//---------------------------------------------------------
// Force the background color to transparent:
//---------------------------------------------------------
Expand Down
Loading

0 comments on commit 483a2e1

Please sign in to comment.