Commit 4e270d9
authored
Don't hit all properties on Color in ColorTranslator (#106042)
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 #1059921 parent 47ebcf3 commit 4e270d9
File tree
2 files changed
+8
-3
lines changed- src/libraries/System.Drawing.Primitives/src/System/Drawing
2 files changed
+8
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
389 | | - | |
| 393 | + | |
| 394 | + | |
390 | 395 | | |
391 | 396 | | |
392 | 397 | | |
| |||
0 commit comments