Signed-off-by: Jeff Smith whydoubt@gmail.com --- Supersedes uncommitted portions of 187295 and 187296.
dlls/gdiplus/graphics.c | 10 +++++----- dlls/gdiplus/tests/brush.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 6619be9b58..4b141e19b6 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -159,8 +159,8 @@ static HBITMAP create_hatch_bitmap(const GpHatch *hatch, INT origin_x, INT origi * degree of shading needed. */ for (y = 0; y < 8; y++) { - const int hy = (((y + origin_y) % 8) + 8) % 8; - const int hx = ((origin_x % 8) + 8) % 8; + const int hy = (y + origin_y) & 7; + const int hx = origin_x & 7; unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
for (x = 0; x < 8; x++, row >>= 1) @@ -1198,13 +1198,13 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush, /* See create_hatch_bitmap for an explanation of how index is derived. */ for (y = 0; y < fill_area->Height; y++, argb_pixels += cdwStride) { - const int hy = (7 - ((y + fill_area->Y - graphics->origin_y) % 8)) % 8; - const int hx = ((graphics->origin_x % 8) + 8) % 8; + const int hy = ~(y + fill_area->Y - graphics->origin_y) & 7; + const int hx = graphics->origin_x & 7; const unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
for (x = 0; x < fill_area->Width; x++) { - const unsigned int srow = row >> (7 - ((x + fill_area->X) % 8)); + const unsigned int srow = row >> (~(x + fill_area->X) & 7); int index; if (hatch_data[8]) index = (srow & 1) ? 2 : (srow & 0x82) ? 1 : 0; diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index 5d5280c7f9..78939e6899 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -1814,8 +1814,8 @@ static void test_renderingOrigin(void)
for (i = 0; i < ARRAY_SIZE(tests); i++) { - const INT exp_x = ((tests[i][0] % 8) + 8) % 8; - const INT exp_y = ((tests[i][1] % 8) + 8) % 8; + const INT exp_x = tests[i][0] & 7; + const INT exp_y = tests[i][1] & 7;
status = GdipSetRenderingOrigin(graphics_image, tests[i][0], tests[i][1]); expect(Ok, status);
--- dlls/gdiplus/tests/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index d32453fa38..93729650de 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -5913,7 +5913,7 @@ static void test_graphics_clear(void) if (!match) { bits = data.Scan0; - trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppPARGB, + trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppARGB, bits[0], bits[1], bits[2], bits[3], bits[4], bits[5], bits[6], bits[7]); } status = GdipBitmapUnlockBits(bitmap, &data);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=73663
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/gdiplus/graphics.c:159 error: patch failed: dlls/gdiplus/tests/brush.c:1814 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/gdiplus/graphics.c:159 error: patch failed: dlls/gdiplus/tests/brush.c:1814 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/gdiplus/graphics.c:159 error: patch failed: dlls/gdiplus/tests/brush.c:1814 Task: Patch failed to apply
Signed-off-by: Jeff Smith whydoubt@gmail.com --- v2: - Signed-off-by
dlls/gdiplus/tests/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index d32453fa38..93729650de 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -5913,7 +5913,7 @@ static void test_graphics_clear(void) if (!match) { bits = data.Scan0; - trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppPARGB, + trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppARGB, bits[0], bits[1], bits[2], bits[3], bits[4], bits[5], bits[6], bits[7]); } status = GdipBitmapUnlockBits(bitmap, &data);
Signed-off-by: Esme Povirk vincent@codeweavers.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=73662
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/gdiplus/graphics.c:159 error: patch failed: dlls/gdiplus/tests/brush.c:1814 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/gdiplus/graphics.c:159 error: patch failed: dlls/gdiplus/tests/brush.c:1814 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/gdiplus/graphics.c:159 error: patch failed: dlls/gdiplus/tests/brush.c:1814 Task: Patch failed to apply
Like Marvin, I am also confused about the order in which the patches you've currently sent should be applied.
Long story short: 187303 and 187307.
On Thu, Jun 18, 2020 at 8:06 PM Esme Povirk (they/them) vincent@codeweavers.com wrote:
Like Marvin, I am also confused about the order in which the patches you've currently sent should be applied.