[.NET/CoreVideo] Use [UnmanagedCallersOnly] instead of [MonoPInvokeCallback] Partial Fix for #10470 - #15892
Conversation
| var tempInNow = *inNow; | ||
| var tempInOutputTime = *inOutputTime; | ||
| var tempFlagsOut = *flagsOut; | ||
| var returnValue = func (delegateDisplayLink, ref tempInNow, ref tempInOutputTime, flagsIn, ref tempFlagsOut); |
There was a problem hiding this comment.
Not a big deal, but I think you can use System.Runtime.InteropServices.Unsafe.Unsafe.AsRef<T> here:
so it becomes something like:
| var returnValue = func (delegateDisplayLink, ref tempInNow, ref tempInOutputTime, flagsIn, ref tempFlagsOut); | |
| var returnValue = func (delegateDisplayLink, ref System.Runtime.CompilerServices.Unsafe.AsRef<CVTimeStamp> (inNow), ...); |
and that way you wouldn't have to create the temporary variables.
There was a problem hiding this comment.
I looked this over in SharpLab and it looks like a win.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [PR Build] Build failed 🔥Build failed for the job 'Detect API changes' Pipeline on Agent |
|
🔥 Unable to find the contents for the comment: D:\a\1\s\change-detection\results\gh-comment.md does not exist :fire Pipeline on Agent |
💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻✅ All tests on macOS Mac Catalina (10.15) passed. Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌Failed tests are:
Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 223 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
straightforward