Commit 2960cf2e authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

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
parent 6c11a4af
......@@ -204,10 +204,6 @@ SVG_SRCS = \
blue_navigation_menu_button_32px.svg \
blue_navigation_menu_button_39px.svg \
blue_navigation_menu_button_52px.svg \
blue_progress_chunk_horizontal.svg \
blue_progress_chunk_vertical.svg \
blue_progress_track_horizontal.svg \
blue_progress_track_vertical.svg \
blue_radiobutton_13px.svg \
blue_radiobutton_16px.svg \
blue_radiobutton_19px.svg \
......
<?xml version="1.0" encoding="UTF-8"?>
<svg id="bitmap:49-24" width="49" height="15" version="1.1" viewBox="0 0 12.965 3.9688" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<rect width="12.965" height="3.9688" fill="#3096fa" style="paint-order:normal"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="bitmap:15-24" width="15" height="49" version="1.1" viewBox="0 0 3.9687 12.965" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<rect transform="rotate(90)" y="-3.9688" width="12.965" height="3.9688" fill="#3096fa" style="paint-order:normal"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="bitmap:53-24" width="53" height="16" version="1.1" viewBox="0 0 14.023 4.2333" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<rect x=".13229" y=".13229" width="13.758" height="3.9688" fill="#fff" stroke="#aeaeae" stroke-width=".26458"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="bitmap:14-24" width="14" height="17" version="1.1" viewBox="0 0 3.7042 4.4979" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<rect x=".13229" y=".13229" width="3.4396" height="4.2333" fill="#fff" stroke="#aeaeae" stroke-width=".26458"/>
</svg>
......@@ -1215,29 +1215,19 @@ BLUE_INI TEXTFILE
"BorderColor = 174 174 174\r\n"
"[Progress.Bar]\r\n"
"BgType = ImageFile\r\n"
"ImageFile = blue_progress_track_horizontal.bmp\r\n"
"MinSize = 10, 10\r\n"
"SizingMargins = 1, 1, 1, 1\r\n"
"SizingType = Stretch\r\n"
"FillColor = 255 255 255\r\n"
"[Progress.BarVert]\r\n"
"BgType = ImageFile\r\n"
"ImageFile = blue_progress_track_vertical.bmp\r\n"
"SizingMargins = 1, 1, 1, 1\r\n"
"SizingType = Stretch\r\n"
"FillColor = 255 255 255\r\n"
"[Progress.Chunk]\r\n"
"BgType = ImageFile\r\n"
"ImageFile = blue_progress_chunk_horizontal.bmp\r\n"
"SizingMargins = 1, 1, 1, 1\r\n"
"SizingType = Stretch\r\n"
"BorderSize = 0\r\n"
"FillColor = 48 150 250\r\n"
"[Progress.ChunkVert]\r\n"
"BgType = ImageFile\r\n"
"ImageFile = blue_progress_chunk_vertical.bmp\r\n"
"SizingMargins = 1, 1, 1, 1\r\n"
"SizingType = Stretch\r\n"
"BorderSize = 0\r\n"
"FillColor = 48 150 250\r\n"
"[Progress.Fill]\r\n"
"FillColor = 48 150 250\r\n"
......@@ -1276,17 +1266,10 @@ BLUE_INI TEXTFILE
"BgType = None\r\n"
"[Progress.TransparentBar]\r\n"
"BgType = ImageFile\r\n"
"ImageFile = blue_progress_track_horizontal.bmp\r\n"
"MinSize = 10, 10\r\n"
"SizingMargins = 1, 1, 1, 1\r\n"
"SizingType = Stretch\r\n"
"FillColor = 255 255 255\r\n"
"[Progress.TransparentBarVert]\r\n"
"BgType = ImageFile\r\n"
"ImageFile = blue_progress_track_vertical.bmp\r\n"
"SizingMargins = 1, 1, 1, 1\r\n"
"SizingType = Stretch\r\n"
"FillColor = 255 255 255\r\n"
"\r\n; Rebar\r\n"
"[Rebar]\r\n"
......@@ -3530,19 +3513,6 @@ BLUE_NAVIGATION_MENU_BUTTON_39PX_BMP BITMAP "blue_navigation_menu_button_39px.bm
/* @makedep: blue_navigation_menu_button_52px.bmp */
BLUE_NAVIGATION_MENU_BUTTON_52PX_BMP BITMAP "blue_navigation_menu_button_52px.bmp"
/* Progress */
/* @makedep: blue_progress_chunk_horizontal.bmp */
BLUE_PROGRESS_CHUNK_HORIZONTAL_BMP BITMAP "blue_progress_chunk_horizontal.bmp"
/* @makedep: blue_progress_chunk_vertical.bmp */
BLUE_PROGRESS_CHUNK_VERTICAL_BMP BITMAP "blue_progress_chunk_vertical.bmp"
/* @makedep: blue_progress_track_horizontal.bmp */
BLUE_PROGRESS_TRACK_HORIZONTAL_BMP BITMAP "blue_progress_track_horizontal.bmp"
/* @makedep: blue_progress_track_vertical.bmp */
BLUE_PROGRESS_TRACK_VERTICAL_BMP BITMAP "blue_progress_track_vertical.bmp"
/* Rebar */
/* @makedep: blue_rebar_background.bmp */
BLUE_REBAR_BACKGROUND_BMP BITMAP "blue_rebar_background.bmp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment