-
Notifications
You must be signed in to change notification settings - Fork 1k
Move GDI+ initialization and pointer defs to Core assembly #13114
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
Conversation
917c66c
to
905f727
Compare
If the initialization is in the core shared assembly this will allow targetted access to GDI+ functionality without pulling in the entire set of imports. This will enable WPF to drop the full reference to System.Drawing.Common for OLE scenarios.
905f727
to
7ad4ac3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13114 +/- ##
===================================================
- Coverage 61.28089% 61.27734% -0.00355%
===================================================
Files 1541 1541
Lines 158281 158282 +1
Branches 14743 14743
===================================================
- Hits 96996 96991 -5
- Misses 60588 60594 +6
Partials 697 697
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just at my machine, so I thought I take a look.
Looks good to me.
2 questions, although I think I know the answers:
- Is performance impacted since it will be initialized from WPFs side even if they do not need it?
- Could the namespace-move have any backwards compatibility effect?
They do need it initialized, they currently always load System.Drawing.Common when you use the clipboard. Sharing the initializer means we don't have two separate classes managing the process state for this. Performance will be better if they don't have to load the entirety of System.Drawing.Common and create temporary wrapping objects for their scenarios.
Namespaces haven't changed and all of this is internal. This allows testing for |
Is this something we want to fix? |
This is an attempt to not load it. There will still be a dependency on GDI+, which I think might be able to be migrated to WIC long term, but not entirely sure due to the metafile support. (Or possibly everything other than metafiles) |
If the initialization is in the core shared assembly this will allow targetted access to GDI+ functionality without pulling in the entire set of imports.
This will enable WPF to drop the full reference to System.Drawing.Common for OLE scenarios.
Microsoft Reviewers: Open in CodeFlow