Skip to content

Commit 6110f47

Browse files
authored
Optimize PixelFormat creation and PixelFormatConverter conversion speed (#9861)
* Simplify CanConvertFrom * Simplify CanConvertTo * Simplify ConvertFromString * Simplify ConvertFrom * Use pattern-matching in ConvertTo * Improve performance of internal PixelFormat ctor * Shave off 200 lines, improve readibility by using switch expressions * Use stackallocated buffer in GetPixelFormatFlagsFromGuid * Use stackallocated buffer in GetPixelFormat * Mark members of PixelFormat that could be readonly as readonly * Add documentation, remove redundant usings on PixelFormatConverter * Speed up Guid constructor, make Guid readonly, remove redundant usings * Mark members we made readonly in ref projects as well * Stop allocating a wrapper over Masks array we allocate exclusively for the caller * Fix post-merge issues * Swap to readonly collection based on #9860 discussion * Remove temp variable
1 parent 59e9cc0 commit 6110f47

File tree

3 files changed

+329
-704
lines changed

3 files changed

+329
-704
lines changed

0 commit comments

Comments
 (0)