Optimize wxImage::Scale() by pre-calculating the values used.

Precompute the values used by various resampling algorithms once instead of
doing it for each pixel. This dramatically speeds them up: more than 3 times
faster in wxImage benchmark with the small images and up to 5 times faster
with larger images.

Closes #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-01 14:48:24 +00:00
parent 544ab85e05
commit 1b7f2c727d
2 changed files with 152 additions and 57 deletions

View File

@@ -673,6 +673,7 @@ All (GUI):
- Add wxMouseEvent::GetColumnsPerAction() (toiffel).
- Add support for horizontal mouse wheel scrolling in wxSTC (toiffel).
- Improve wrapping of cell contents in wxGrid (nmset).
- Big speed up in wxImage::Scale(wxIMAGE_QUALITY_HIGH) (Hsilgos).
wxGTK: