-- v2: gdiplus: move pointer calculation outside inner loop to improve performance
From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/graphics.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index e3b5661fd67..30190700060 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -422,29 +422,29 @@ static GpStatus alpha_blend_bmp_pixels(GpGraphics *graphics, INT dst_x, INT dst_
for (y=0; y<src_height; y++) { + ARGB *src_color = (ARGB*)(src + src_stride * y); for (x=0; x<src_width; x++) { - ARGB dst_color, src_color; - src_color = ((ARGB*)(src + src_stride * y))[x]; - if (comp_mode == CompositingModeSourceCopy) { - if (!(src_color & 0xff000000)) + if (!(*src_color & 0xff000000)) GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, 0); else - GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, src_color); + GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, *src_color); } else { - if (!(src_color & 0xff000000)) + ARGB dst_color; + if (!(*src_color & 0xff000000)) continue;
GdipBitmapGetPixel(dst_bitmap, x+dst_x, y+dst_y, &dst_color); if (fmt & PixelFormatPAlpha) - GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, color_over_fgpremult(dst_color, src_color)); + GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, color_over_fgpremult(dst_color, *src_color)); else - GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, color_over(dst_color, src_color)); + GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, color_over(dst_color, *src_color)); } + src_color += sizeof(ARGB); } }
Bartosz Kosiorek wine@gitlab.winehq.org wrote:
for (y=0; y<src_height; y++) {
ARGB *src_color = (ARGB*)(src + src_stride * y);
...
}src_color += sizeof(ARGB); }
This increment is incorrect.
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=135906
Your paranoid android.
=== debian11 (32 bit report) ===
gdiplus: brush.c:1836: Test failed: Unexpected pattern for hatch style 0 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x3 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x4 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x5 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x6 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x7 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x8 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x9 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xa with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xb with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xc with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xd with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xe with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xf with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x10 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x11 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x12 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x13 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x14 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x15 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x16 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x17 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x18 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x19 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1a with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1b with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1c with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1d with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1e with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1f with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x20 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x21 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x22 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x23 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x24 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x25 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x26 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x27 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x28 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x29 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2a with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2b with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2c with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2d with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2e with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2f with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x30 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x31 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x32 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x33 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x34 with image. brush.c:1925: Test failed: Hatch brush rendered incorrectly on image with rendering origin (3, 6). brush.c:1925: Test failed: Hatch brush rendered incorrectly on image with rendering origin (-7, -4). graphics.c:2638: Test succeeded inside todo block: Expected 104, got 104 graphics.c:6931: Test failed: Expected -16776961, got 0 graphics.c:6935: Test failed: Expected -16776961, got 0 image.c:4812: Test failed: 1: data should match image.c:4812: Test failed: 2: data should match image.c:4812: Test failed: 3: data should match image.c:4812: Test failed: 4: data should match image.c:4812: Test failed: 5: data should match image.c:4812: Test failed: 6: data should match image.c:4812: Test failed: 8: data should match image.c:4812: Test failed: 9: data should match image.c:4812: Test failed: 10: data should match image.c:4812: Test failed: 11: data should match image.c:4812: Test failed: 12: data should match image.c:4812: Test failed: 13: data should match image.c:4812: Test failed: 15: data should match image.c:4812: Test failed: 18: data should match image.c:4812: Test failed: 22: data should match image.c:4812: Test failed: 25: data should match image.c:4522: Test failed: data should match image.c:4566: Test failed: Expected -65536, got 0 image.c:4612: Test failed: data should match image.c:3529: Test failed: Expected ffffffff, got 00000000 image.c:3548: Test failed: Expected 60708090, got 00000000 image.c:3552: Test failed: Expected ffffffff, got 00000000 metafile.c:699: Test failed: Expected -16776961, got 00000000 metafile.c:708: Test failed: Expected -16776961, got 00000000 metafile.c:727: Test failed: Expected -16776961, got 00000000 metafile.c:907: Test failed: Expected -16776961, got 00000000 metafile.c:922: Test failed: Expected -16776961, got 00000000 metafile.c:942: Test failed: Expected -16776961, got 00000000 metafile.c:2243: Test failed: Expected -16776961, got 21364736 metafile.c:2498: Test failed: Expected -00065536, got 00000000 metafile.c:2990: Test failed: Expected -16776961, got 00000000 metafile.c:2994: Test failed: Expected -16776961, got 00000000 metafile.c:3002: Test failed: Expected -16776961, got 00000000 metafile.c:3316: Test failed: Expected -00065536, got -16776961 metafile.c:3438: Test failed: Expected -06750106, got -10092391 metafile.c:3456: Test failed: Expected -12123976, got -15466261
=== debian11b (64 bit WoW report) ===
gdiplus: brush.c:1836: Test failed: Unexpected pattern for hatch style 0 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x3 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x4 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x5 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x6 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x7 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x8 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x9 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xa with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xb with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xc with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xd with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xe with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0xf with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x10 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x11 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x12 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x13 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x14 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x15 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x16 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x17 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x18 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x19 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1a with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1b with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1c with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1d with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1e with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x1f with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x20 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x21 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x22 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x23 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x24 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x25 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x26 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x27 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x28 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x29 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2a with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2b with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2c with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2d with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2e with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x2f with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x30 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x31 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x32 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x33 with image. brush.c:1836: Test failed: Unexpected pattern for hatch style 0x34 with image. brush.c:1925: Test failed: Hatch brush rendered incorrectly on image with rendering origin (3, 6). brush.c:1925: Test failed: Hatch brush rendered incorrectly on image with rendering origin (-7, -4). graphics.c:2638: Test succeeded inside todo block: Expected 104, got 104 graphics.c:6931: Test failed: Expected -16776961, got 0 graphics.c:6935: Test failed: Expected -16776961, got 0 image.c:4812: Test failed: 1: data should match image.c:4812: Test failed: 2: data should match image.c:4812: Test failed: 3: data should match image.c:4812: Test failed: 4: data should match image.c:4812: Test failed: 5: data should match image.c:4812: Test failed: 6: data should match image.c:4812: Test failed: 8: data should match image.c:4812: Test failed: 9: data should match image.c:4812: Test failed: 10: data should match image.c:4812: Test failed: 11: data should match image.c:4812: Test failed: 12: data should match image.c:4812: Test failed: 13: data should match image.c:4812: Test failed: 15: data should match image.c:4812: Test failed: 18: data should match image.c:4812: Test failed: 22: data should match image.c:4812: Test failed: 25: data should match image.c:4522: Test failed: data should match image.c:4566: Test failed: Expected -65536, got 0 image.c:4612: Test failed: data should match image.c:3529: Test failed: Expected ffffffff, got 00000000 image.c:3548: Test failed: Expected 60708090, got 00000000 image.c:3552: Test failed: Expected ffffffff, got 00000000 metafile.c:699: Test failed: Expected -16776961, got 00000000 metafile.c:708: Test failed: Expected -16776961, got 00000000 metafile.c:727: Test failed: Expected -16776961, got 00000000 metafile.c:907: Test failed: Expected -16776961, got 00000000 metafile.c:922: Test failed: Expected -16776961, got 00000000 metafile.c:942: Test failed: Expected -16776961, got 00000000 metafile.c:2243: Test failed: Expected -16776961, got 00000000 metafile.c:2498: Test failed: Expected -00065536, got 00000000 metafile.c:2990: Test failed: Expected -16776961, got 00000000 metafile.c:2994: Test failed: Expected -16776961, got 00000000 metafile.c:3002: Test failed: Expected -16776961, got 00000000 metafile.c:3316: Test failed: Expected -00065536, got -16776961 metafile.c:3438: Test failed: Expected -06750106, got -10092391 metafile.c:3456: Test failed: Expected -12123976, got -15466261
On Fri Aug 11 08:48:59 2023 +0000, **** wrote:
Dmitry Timoshkov replied on the mailing list:
Bartosz Kosiorek <wine@gitlab.winehq.org> wrote: > for (y=0; y<src_height; y++) > { > + ARGB *src_color = (ARGB*)(src + src_stride * y); ... > + src_color += sizeof(ARGB); > } > } This increment is incorrect. -- Dmitry.
It seems that Linux32 tests are failing with previous changes. Linux64 test were passing.