-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Annotate missing
ComOutPtr
in CompositionSwapchain
and `DirectCom…
…position` (#1970) `dcomp.h` and `Presentation.h` are missing some `_COM_Outptr_` annotations, turning these functions in `windows-rs` to take a meaningless `*mut *mut c_void`. With this annotation the functions return a generic `T: Interface` _and_ automatically pass its `&T::IID` to the `riid` parameter resulting in a much more ergonomic API. Also annotate some return-only functions with `RetVal` to make it easier to retrieve these objects.
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Annotate ComOutPtr in CompositionSwapchain and DirectComposition | ||
Windows.Win32.Graphics.CompositionSwapchain.Apis.CreatePresentationFactory : presentationFactory : [Out] => [ComOutPtr,Out] | ||
Windows.Win32.Graphics.CompositionSwapchain.IPresentationManager.GetPresentRetiringFence : fence : [Out,RetVal] => [ComOutPtr,Out,RetVal] | ||
Windows.Win32.Graphics.DirectComposition.Apis.DCompositionGetStatistics : frameStats : [Out] => [Out,RetVal] | ||
Windows.Win32.Graphics.DirectComposition.Apis.DCompositionGetTargetStatistics : targetStats : [Out] => [Out,RetVal] | ||
Windows.Win32.Graphics.DirectComposition.IDCompositionDevice.GetFrameStatistics : statistics : [Out] => [Out,RetVal] | ||
Windows.Win32.Graphics.DirectComposition.IDCompositionDevice2.GetFrameStatistics : statistics : [Out] => [Out,RetVal] | ||
Windows.Win32.Graphics.DirectComposition.IDCompositionTexture.GetAvailableFence : availableFence : [Out] => [ComOutPtr,Out] |