10 Aug
2023
10 Aug
'23
5:58 p.m.
On Thu Aug 10 22:58:33 2023 +0000, Nikolay Sivov wrote:
What difference does this make? In previous implementation we calculated `src_color` position every time:
for (x=0; x<src_width; x++)
{
ARGB dst_color, src_color;
src_color = ((ARGB*)(src + src_stride * y))[x];
With new implementation we are calculating `src_color` position only once (before `x` loop), and we just iterating the `src_color++`: ``` ARGB *src_color = ((ARGB*)(src + src_stride * y)); for (x=0; x<src_width; x++) { ... src_color++; } ``` It is much faster (avoiding not needed multiplications), especially for wide images. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3546#note_41984