-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Fix transformations when painting image masks and tiling patterns. #13683
Conversation
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://3.101.106.178:8877/b5caff5f14ede14/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/c48fed926f5d8b7/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/c48fed926f5d8b7/output.txt Total script time: 31.73 mins
Image differences available at: http://54.67.70.0:8877/c48fed926f5d8b7/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/b5caff5f14ede14/output.txt Total script time: 36.10 mins
Image differences available at: http://3.101.106.178:8877/b5caff5f14ede14/reftest-analyzer.html#web=eq.log |
There seem to be a number of cases, mostly involving images with "text", which now look a bit blurrier (and less sharp) than before. |
I'm not quite sure why some of the images seem a bit more blurry. I thought if anything they'd be more crisp since we are now drawing at the correct scale. It could be we're now drawing at fractional x/y and the pixels are being blurred. Locally I can't tell a difference with a high-dpi screen, but I'll look into a few to see if there's anything obvious. |
Previously, when we filled image masks we didn't copy over the current transformation, this caused patterns to be misaligned when painted. Now we create a temporary canvas with the mask and have the transform copied over and offset it relative to where the mask would be painted. We also weren't properly offsetting tiling patterns. This isn't usually noticeable since patters repeat, but in the case of mozilla#13561 the pattern is only drawn once and has to be in the correct position to line up with the mask image. These fixes broke mozilla#11473, but highlighted that we were drawing that correctly by accident and not correctly handling negative bounding boxes on tiling patterns. Fixes mozilla#6297, mozilla#13561, mozilla#13441 Partially fixes mozilla#1344 (still blurry but boxes are in correct position now)
I did some testing and it looks like the issue was drawing the image with fractional offsetX/Y coordinates. Let's try this again... |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://3.101.106.178:8877/f2e2b1b11c5827a/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/03b9aa14a298940/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/03b9aa14a298940/output.txt Total script time: 31.59 mins
Image differences available at: http://54.67.70.0:8877/03b9aa14a298940/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/f2e2b1b11c5827a/output.txt Total script time: 35.93 mins
Image differences available at: http://3.101.106.178:8877/f2e2b1b11c5827a/reftest-analyzer.html#web=eq.log |
It's looking better now. |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/2a95eb4d426a8e2/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/2a95eb4d426a8e2/output.txt Total script time: 4.69 mins Published |
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.
Looks good to me, thank you!
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/b3c1feb2a37a3d8/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 1 Live output at: http://3.101.106.178:8877/e1d56f84499ea0c/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/b3c1feb2a37a3d8/output.txt Total script time: 28.50 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/e1d56f84499ea0c/output.txt Total script time: 33.29 mins
|
Previously, when we filled image masks we didn't copy over the current transformation,
this caused patterns to be misaligned when painted. Now we create a temporary
canvas with the mask and have the transform copied over and offset it relative to
where the mask would be painted. We also weren't properly offsetting tiling patterns.
This isn't usually noticeable since patters repeat, but in the case of #13561 the pattern
is only drawn once and has to be in the correct position to line up with the mask image.
These fixes broke #11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.
Fixes #6297, #13561, #13441
Partially fixes #1344 (still blurry but boxes are in correct position now)