-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Artifacting when drawing, selecting, dragging, erasing, etc. #1263
Comments
I'm getting this same issue after updating an hour ago. My specs are as follows. OS: Nixos Unstable |
I'm getting this issue too, using version |
I have this issue too in both Hyprland and KDE(with Wayland) and using the latest version of rnote. |
I'm also experiencing this issue on The problem is with damage tracking, and only happens with a fractional scale. Somewhere, the damage region is likely rounded to surface-local coordinates (which are integers; one fundamental flaw of the core Wayland protocol that unfortunately cannot be fixed), which is wrong and causes off-by-one errors like this. I couldn't easily find the offending code from a quick search for The correct way to implement this is to ignore the surface-local coordinates. Because damage is inherently unrelated to surface geometry, there exists a The issue doesn't occur on integer scales because then the rounding is exact. It seems to be the case that every buffer from rnote is an empty buffer with transparent pixels. This issue would be less noticeable if the remainder of the buffer was also content, because then the only effect is that the GPU does slightly more work than necessary. Because the region that wasn't drawn is transparent, it causes the parts that were not drawn to update to a transparent pixel instead. It is part of the surface's opaque region, so most compositors will show the incorrectly damaged parts as black, unless you have a window rule making the whole window transparent, in which case it will show your wallpaper or whatever's behind. Panning removes the artifacts because it redraws the entire buffer and damages the entire buffer. |
I have this issue too, with any level of fractional scaling. Without fractional scaling issue dissappears. Runnig on KDE Plasma 6.2 Wayland |
Ah, that explains it. kinda sucks, because fractional scaling is the only thing that works properly on my laptop due to it being a high dpi screen. normal scale value and everything is too small. |
@HenriHawk42 have you tried a scale of 2? |
@devraza the scaling appears too large for my laptop (i.e. the buttons are too big) |
I've tried to reproduce this, and I'm getting these artifacts everywhere when fractional scaling is enabled (e.g. when hovering over elements of the workspace browser), not just within the canvas. Rnote doesn't interact with Wayland directly, but sodiboo might still be on the right track. It could also be a GTK, mutter or cairo bug (or any other abstraction we use); fractional scaling is experimental after all. I'm not sure, I'll try to do some more testing soon. |
Yeah, i wasn't able to find much Wayland-specific code. But i am approaching the issue from the perspective of a Wayland compositor (as that's the thing i'm to some extent working on), so i described what is definitely happening at that level. The actual location of the bug is at some higher level of abstraction, but fundamentally it does look like it's incorrectly rounding the buffer damages to fractional scales (which again, is wrong and unnecessary, because even at the lower level of the stack you are supposed to pass the raw buffer damage, so it shouldn't be rounded anywhere along the chain of custody) |
switching to an integer scale factor fixed this issue perfectly for me, and this is honestly better because the buttons are bigger for ease of touch. only downside is that other apps are scaled incorrectly. i wonder if i can somehow tell hyprland to use 1.6 scaling for other apps but to use a scale factor of 2 for just rnote |
@HenriHawk42 maybe you could have a script running that changes the scale factor depending on whether you've got focus on rnote or not. |
yuhp, i was thinking that myself |
I thought Also, what versions of gtk are you on ? Edit : It still happens with the gl renderer (also applies to the general UI outside of the canvas !), sometimes but less with the ngl renderer and on vulkan I'm not sure (I have a lot of artefacting in some cases but of a different kind, though I'm not sure how specific to my machine this is, I'm on asahi) |
Describe the bug
Any form of movement on the canvas results in artifacting, generally wallpaper artifacts, but sometimes artifacts from the eraser or selection tool. The main brush will also often default to selection, but it's not consistent. I feel like this is related to the other issue, because if my memory serves me correctly, I didn't have these issues a couple of months ago. I feel like either a system update or a rnote update created this issue.
To Reproduce
I'm not sure how to reproduce this behavior. My apologies.
Expected behavior
A clear and concise description of what you expected to happen.
Console Output
(I don't know how to get this, I didn't install rnote with flatpak, sorry)
Screenshots
Here's a screen recording of the artifacting. Note that it also occurs with the red border of the eraser tool.
2024-10-24.13-22-58.mp4
Desktop:
Additional context
This issue seems very similar to #309
The text was updated successfully, but these errors were encountered: