Skip to content

Don't hit all properties on Color in ColorTranslator#106042

Merged
JeremyKuhne merged 1 commit into
dotnet:mainfrom
JeremyKuhne:colortranslator
Aug 6, 2024
Merged

Don't hit all properties on Color in ColorTranslator#106042
JeremyKuhne merged 1 commit into
dotnet:mainfrom
JeremyKuhne:colortranslator

Conversation

@JeremyKuhne
Copy link
Copy Markdown
Member

KnownColor based Color values look up the value with every method/property access. Avoid this by making Color.GetRgbValues internal and use it in ColorTranslator.

This is more of a hit in Windows where system colors also involve a system call.

Fixes #105992

KnownColor based Color values look up the value with every method/property access. Avoid this by making Color.GetRgbValues internal and use it in ColorTranslator.

This is more of a hit in Windows where system colors also involve a system call.

Fixes dotnet#105992
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ColorTranslator.ToWin32 is inefficient

2 participants