-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 493455 - [win32] fix: source position ignored when drawing transparent image #12
Bug 493455 - [win32] fix: source position ignored when drawing transparent image #12
Conversation
Could you add a manual regression test / example? |
d664683
to
5b2b875
Compare
I added a JUnit test even, I hope that's fine too. I could easily convert it to a manual test if that's preferred. |
The new test fails... The another one from browser can be ignored.
|
Hmm, I see. I can't reproduce the assertion, neither on my Windows nor on my Linux system, the test passes on both for me. Any hints as to what could be different on your Linux test agent? Otherwise I will just provide a manual test as you suggested. |
…arent image This is a regression that was introduced with commit 22797d3.
5b2b875
to
3641b0c
Compare
Ah yes of course, when stretching the green part, the red part may bleed into the green part at the border due to interpolation. Stretching is actually not necessary so I adjusted the test accordingly and now it passes. Thanks a lot for looking into this @SyntevoAlex! |
Thanks for fixing it quickly! It's always a pleasure when my effort is not in vain :) |
The patch makes sense to me and the test now passes. |
@SyntevoAlex : please don't hesitate to merge if you reviewed & approved patches. |
OK. I wasn't sure if that's an appropriate thing to do now that you already participated. |
for (int i = 0; i < 100; ++i) { | ||
for (int j = 0; j < 150; ++j) { | ||
RGB rgb = testImageData.palette.getRGB(testImageData.getPixel(i, j)); | ||
assertEquals(green, rgb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_bug493455_drawImageAlpha_srcPos fails on both MAC platforms
See
- https://download.eclipse.org/eclipse/downloads/drops4/I20220406-1800/testresults/html/org.eclipse.swt.tests_ep424I-unit-mac64-java17_macosx.cocoa.x86_64_17.html
- https://download.eclipse.org/eclipse/downloads/drops4/I20220406-1800/testresults/html/org.eclipse.swt.tests_ep424I-unit-macM1-java17_macosx.cocoa.aarch64_17.html
expected:<RGB {0, 255, 0}> but was:<RGB {255, 255, 255}>
java.lang.AssertionError: expected:<RGB {0, 255, 0}> but was:<RGB {255, 255, 255}>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:120)
at org.junit.Assert.assertEquals(Assert.java:146)
at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_GC.test_bug493455_drawImageAlpha_srcPos(Test_org_eclipse_swt_graphics_GC.java:681)
Fixes a regression introduced with commit 22797d3 that was reported in Bug 493455 (comment 51).