Skip to content

Commit

Permalink
Revert [RetVal] annotation for multi-output `DCompositionGetStatist…
Browse files Browse the repository at this point in the history
…ics()`

This function returns multiple values via multiple mutable pointer
arguments, besides the annotated `frameStats` parameter not being the
last parameter.

Revert it because it has no effect on `windows-rs` and could even
break in the future, because it's not intended to be used this way.

Allso correct `CountFieldName` on `DCompositionGetStatistics()`, which
upstream SAL has typo'd as `targetCount` instead of `targetIdCount`.
  • Loading branch information
MarijnS95 committed Sep 3, 2024
1 parent 6dbe97c commit 2ef4c6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion generation/WinSDK/emitter.settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ IWICImagingFactory::CreateDecoderFromFilename::pguidVendor=[Optional]
DCompositionCreateDevice::dcompositionDevice=[ComOutPtr]
DCompositionCreateDevice2::dcompositionDevice=[ComOutPtr]
DCompositionCreateDevice3::dcompositionDevice=[ComOutPtr]
DCompositionGetStatistics::frameStats=[RetVal]
DCompositionGetStatistics::targetIds=[NativeArrayInfo(CountFieldName = "targetIdCount")]
DCompositionGetTargetStatistics::targetStats=[RetVal]
CreatePresentationFactory::presentationFactory=[ComOutPtr]
IPresentationManager::GetPresentRetiringFence::fence=[ComOutPtr]
Expand Down
7 changes: 4 additions & 3 deletions scripts/ChangesSinceLastRelease.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 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]
Expand Down Expand Up @@ -2591,7 +2590,7 @@ Windows.Win32.System.Ioctl.Apis.DEVPKEY_Storage_System_Critical...Windows.Win32.
Windows.Win32.System.Power.Apis.PROCESSOR_NUMBER_PKEY...Windows.Win32.Devices.Properties.DEVPROPKEY => Windows.Win32.Foundation.DEVPROPKEY
# Remove StructSizeField from BLOB, BSTRBLOB
Windows.Win32.System.Com.BLOB : [Documentation(https://learn.microsoft.com/windows/win32/api/nspapi/ns-nspapi-blob),StructSizeField(cbSize)] => [Documentation(https://learn.microsoft.com/windows/win32/api/nspapi/ns-nspapi-blob)]
Windows.Win32.System.Com.StructuredStorage.BSTRBLOB : [StructSizeField(cbSize)] =>
Windows.Win32.System.Com.StructuredStorage.BSTRBLOB : [StructSizeField(cbSize)] =>
# Add PRINTER_HANDLE type
Windows.Win32.Graphics.Printing.Apis.AbortPrinter : hPrinter...HANDLE => PRINTER_HANDLE
Windows.Win32.Graphics.Printing.Apis.AddFormA : hPrinter...HANDLE => PRINTER_HANDLE
Expand Down Expand Up @@ -2699,4 +2698,6 @@ Windows.Win32.Graphics.Printing.IPrintTicketProvider.BindPrinter : hPrinter...HA
Windows.Win32.Graphics.Printing.IPrintTicketProvider.GetSupportedVersions : hPrinter...HANDLE => PRINTER_HANDLE
Windows.Win32.Graphics.Printing.PRINTER_HANDLE added
# Remove RAIIFree attribute from PSID
Windows.Win32.Security.PSID : [NativeTypedef,RAIIFree(FreeSid)] => [NativeTypedef]
Windows.Win32.Security.PSID : [NativeTypedef,RAIIFree(FreeSid)] => [NativeTypedef]
# Correct `CountFieldName` on `DCompositionGetStatistics()`
Windows.Win32.Graphics.DirectComposition.Apis.DCompositionGetStatistics : targetIds : [Optional,Out] => [NativeArrayInfo(CountFieldName=targetIdCount),Optional,Out]

0 comments on commit 2ef4c6a

Please sign in to comment.