Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

Rendering error on X11 - webrender doesn't render bottom of rectangle correctly if window is maximized #40

Open
fschutt opened this issue Nov 30, 2017 · 5 comments

Comments

@fschutt
Copy link
Contributor

fschutt commented Nov 30, 2017

I don't have time to investigate this currently, but here:

error

... the bottom of the rectangle doesn't get rendered for whatever reason. Probably a webrender mistake.

The layout is correct, as far as I can see:

error_with_borders

Only occurs when the window is maximized! This doesn't happen in a regular 800x600 window. It's only a minor annoyance, though.

@fschutt
Copy link
Contributor Author

fschutt commented Nov 30, 2017

This issue seems to appear when the height of the window (in pixel) is odd. Probably a rounding error.

@tones111
Copy link

tones111 commented Dec 2, 2017

I see this with the button example on the bottom and/or right edge when resizing the window.

@tones111
Copy link

tones111 commented Dec 4, 2017

This appears to be a symptom of rounding the bounds in rect.rs draw. The border draws properly with the rounding removed. Borders are expanded to a minimum of 2 to prevent the entire side of the rectangle from dropping, but it's not enough to overcome the rounding. The same type of dropped line due to rounding can occur with an odd border width and certain window dimensions but in that case there is at least some potion of the side drawn.

@christolliday can you elaborate on the "bug in webrender that produces artifacts around the corners" that motivated the rounding hack?

@christolliday
Copy link
Owner

Yeah there were big black artifacts inside the corner radius of rects on older versions of webrender, you'd see it the most clearly in the circles in the circle example, I just tested it and it looks to be resolved now on my machine at least, and it fixes the issue of the missing rect bottom as well. I still see an issue of rect borders at some sizes being thicker by a pixel on the top and left than on the bottom and right at the moment (esp. evident with 2px borders), don't have time to look closer at it at the moment but I'll remove the rounding code.

@christolliday
Copy link
Owner

Actually scratch that, there are still some artifacts when the rounding is removed, they are less noticeable than before though. You should be able see them if you comment out the rounding code, run the button example and resize the window.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants