-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Revert "Re-Land "Refactor StrokeAlign to allow double values." (#109805)" #109955
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
Conversation
…er#109805)" This reverts commit b3aba4d because it breaks Google tests.
|
Merging as it's a revert. |
|
Is there any way I can help? |
|
@bernaferrari No, I think it requires access to the failing tests to fix. The problem appears to be something along the lines of some rounding or an off-by-one error. Some thin borders disappear entirely, and others are just off by a bit (less than a pixel). I'll see if I can make a repro case that we can use as a regression test. |
|
If I remember well, one thing we removed was if (width == 0) drawRRect (now it draws DRRect, no special case. In the perfect world, it wouldn't even be drawn). It is the only thing I can think of. Feel free to try adding it again (or skipping!) and see how the test behaves. That's the only thing I can think. |
|
Try on RoundedRectangleBorder.paint: if (width == 0.0) {
canvas.drawRRect(borderRadius.resolve(textDirection).toRRect(rect), side.toPaint());
} else {
// ...
}or if (width == 0.0) return; |
flutter#109805)" (flutter#109955)" This reverts commit 957a8da.
|
I went ahead and made this: #109975 I have two theories: drawDRRect has a bug and the person that made width == 0 knew this. Or, drawRRect when width == 0 does something which is better than not drawing anything (or drawing the 'wrong' way). |
It doesn't kick in until the PR has been approved.
It doesn't have a bug, but I think that perhaps the anti-aliasing behavior is different between the two. I'll take a look. |
That's how it worked, but now it doesn't. You merged your and I merged mine without the Google testing happening. It only happened after. |
This reverts commit b3aba4d because it breaks Google tests.
Clearly, I didn't find all of the instances. Also, looks like this time we have some rounding error issues or something. The last time it failed, I didn't see any of that. Reverting until I understand why that is.
b/243217872
cc @bernaferrari