light.msstyles: Use border fill background for progress parts.
commit2960cf2e0616216fb8d01e11d7ca7475bfe26d97
authorZhiyi Zhang <zzhang@codeweavers.com>
Thu, 6 Apr 2023 08:14:28 +0000 (6 16:14 +0800)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 7 Apr 2023 11:27:33 +0000 (7 13:27 +0200)
tree6bedf9832b57b460cb405e554c4c230aa8456719
parent6c11a4af5885c6485a908ea5c547e072fe71aa23
light.msstyles: Use border fill background for progress parts.

These parts only contain simple images that can be achieved with border fill backgrounds as well.
So visually, this change is a no-op. The reason for using image file backgrounds is that I tend
to use the same background type as the theme files for Windows. However, drawing border fill
background is much more efficient.

Pro Evolution Soccer 2008 demo is buggy and generates ~570,000 WM_PAINT messages for the progress
control. On Windows, it's ~1,140,000 WM_PAINT messages. DrawThemeBackground() on Wine is 10x more
expensive than that of Windows and I found little room for optimization. 60% of the time in
DrawThemeBackground() is spend for CreateCompatibleDC() and other 30% for actually drawing. So I
decided to change light.msstyles instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54728
dlls/light.msstyles/Makefile.in
dlls/light.msstyles/blue_progress_chunk_horizontal.bmp [deleted file]
dlls/light.msstyles/blue_progress_chunk_horizontal.svg [deleted file]
dlls/light.msstyles/blue_progress_chunk_vertical.bmp [deleted file]
dlls/light.msstyles/blue_progress_chunk_vertical.svg [deleted file]
dlls/light.msstyles/blue_progress_track_horizontal.bmp [deleted file]
dlls/light.msstyles/blue_progress_track_horizontal.svg [deleted file]
dlls/light.msstyles/blue_progress_track_vertical.bmp [deleted file]
dlls/light.msstyles/blue_progress_track_vertical.svg [deleted file]
dlls/light.msstyles/light.rc