[kwin] [Bug 425190] Improve scaling of the desktop

2021-01-14 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #25 from Claudius Ellsel  ---
(In reply to Carlos from comment #24)
> Cludius: I don't understand your second experiment quite well. When you
> upscaled x2 you just took the small icons and duplicated everything? If
> that's the case, it might be worth for comparative purposes but I don't
> think as a scaling technique that would improve too much on plain upscaling,
> since it's not adding any new information (like, say, a handcrafted version
> or an upscaled svg version).

You mean my first experiment? I upscaled in the first series and for the second
series I downscaled (after learning that icons are at least in theory only
downscaled), both times starting with (I think) a screenshot of a desktop with
1x or 2x scale factor respectively.

The tray icons in the second approach's 2x source are just looking that small
originally.

Does that help?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2021-01-14 Thread Carlos
https://bugs.kde.org/show_bug.cgi?id=425190

Carlos  changed:

   What|Removed |Added

 CC||carlosjosep...@gmail.com

--- Comment #24 from Carlos  ---
> Linear looks to me even better.

I believe both Mutter and Sway use linear but fallback to nearest for the
special case of integer scaling (see [1] and [2]). xrandr uses bicubic
(although that can be changed to nearest [3]). I haven't done a side-by-side
comparison, but I find all of them work rather fine compared to how tray icons
scale in Plasma panel. We are probably seeing upscaling there and I suppose
there are no handcrafted 2x icons to downscale from.

Cludius: I don't understand your second experiment quite well. When you
upscaled x2 you just took the small icons and duplicated everything? If that's
the case, it might be worth for comparative purposes but I don't think as a
scaling technique that would improve too much on plain upscaling, since it's
not adding any new information (like, say, a handcrafted version or an upscaled
svg version).

---

[1] https://github.com/swaywm/wlroots/issues/1770
[2] https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/845
[3]
https://www.reddit.com/r/GPDPocket/comments/90bras/tip_nearestneighbor_xrandr_display_scaling/

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2021-01-14 Thread soredake
https://bugs.kde.org/show_bug.cgi?id=425190

soredake  changed:

   What|Removed |Added

 CC||ndrzj1...@relay.firefox.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-26 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

Claudius Ellsel  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |---
 Status|NEEDSINFO   |REPORTED

--- Comment #23 from Claudius Ellsel  ---
Setting back to "reported" as I think I provided all required information. Did
not know that I am supposed to change the state myself and did not want to come
off rude by changing it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-25 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #22 from Bug Janitor Service  ---
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-11 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #21 from Claudius Ellsel  ---
(In reply to Roman Gilg from comment #20)
> Interesting comparison. Linear looks to me even better. Might there be other
> algorithms improving upon that though?

Yes, there might. Although from what I read NoHalo in GIMP already seems to do
a pretty decent job for most cases
(https://www.gimpusers.com/system/tutorial_steps/3061/sampling-original.jpg),
although that might not cover the special use case of KDE.

There seems to have also been a LoBlur algorithm be planned for GIMP
(https://www.gimpusers.com/tutorials/whats-new-in-gimp-2-10 point 4) in 2012,
which is not available today. Since GIMP is probably only using known
approaches, there might be already at least theoretical algorithms out there
for this use case.

Also another reference for the NoHalo algorithm in GIMP:
http://libregraphicsworld.org/blog/entry/advanced-samplers-for-gegl-to-be-crowdfunded

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-11 Thread Roman Gilg
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #20 from Roman Gilg  ---
Interesting comparison. Linear looks to me even better. Might there be other
algorithms improving upon that though?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-11 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #18 from Claudius Ellsel  ---
Created attachment 130786
  --> https://bugs.kde.org/attachment.cgi?id=130786=edit
Downscaling with linear algorithm

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-11 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #19 from Claudius Ellsel  ---
Created attachment 130787
  --> https://bugs.kde.org/attachment.cgi?id=130787=edit
Downscaling with NoHalo algorithm

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-11 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #17 from Claudius Ellsel  ---
Created attachment 130785
  --> https://bugs.kde.org/attachment.cgi?id=130785=edit
Original used for downscaling

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-11 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #16 from Claudius Ellsel  ---
Alright, I have done some testing with the downscaling from a 2x version (took
a screenshot on X11 with that scale factor, had to manually double the size of
the panel, too). Did not work to take that screenshot on Wayland due to
https://bugs.kde.org/show_bug.cgi?id=425226.

I tested Linear against NoHalo scaling the version down by a factor of roughly
0.6 and there is almost no noticeable difference. So it seems that downscaling
works good in this use case pretty much regardless of which algorithm is used.

The reason why I opened this was https://bugs.kde.org/show_bug.cgi?id=408215.
This might have a different root cause, though.

Also there is a noticeable blurred notification tray icon in the panel on
Wayland with fractional scaling applied. This might also be related to some
different root cause, though. Unfortunately, due to
https://bugs.kde.org/show_bug.cgi?id=425226 I cannot create a screenshot
depicting the problem.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #15 from Claudius Ellsel  ---
(In reply to Nate Graham from comment #14)
> David, I think Claudius is using the term "scaling" as a user understands
> the term, not as a KWin developer understands the term. Looking at the
> attachments, clearly there are differences in the different ways that images
> can be scaled up. Knowing that fractional scaling downscales from a doubled
> pixel-perfect version, it might be interesting to repeat the tests with
> downscaled images.

Ah, I see my mistake now. Roman Gilg already pointed that out, but I did not
understand it then.

I just assumed it would be scaled up. Downscaling obviously is the better
approach to implementation, since no information has to be interpolated, so
that makes sense.

This renders the different algorithm comparisons I posted rather pointless.
However, I read the the NoHalo algorithms were actually developed for
downscaling in particular and that blurriness can also happen when scaling
down. So the general idea that there might be better algorithms still seems to
be valid.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #14 from Nate Graham  ---
David, I think Claudius is using the term "scaling" as a user understands the
term, not as a KWin developer understands the term. Looking at the attachments,
clearly there are differences in the different ways that images can be scaled
up. Knowing that fractional scaling downscales from a doubled pixel-perfect
version, it might be interesting to repeat the tests with downscaled images.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #13 from David Edmundson  ---
I said the specific thing in your screenshot shouldn't be upscaled. 
If fractional scaling was applied that could result in a downscale of the
original client texture.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #12 from Claudius Ellsel  ---
(In reply to Roman Gilg from comment #11)
> (In reply to Claudius Ellsel from comment #10)
> > So when applying fractional scaling, say a factor of 1.25 the icons, mouse
> > cursor etc. are not upscaled?
> 
> They are rendered at 2-times the normal size and then downscaled. That's the
> theory, in practice there can always be issues.

Do you mean upscaled? A factor of 1.25 increases the size of the icons. This
was my whole question, as David Edmundson stated there wouldn't be upscaling.

> I believe sometimes Qt Wayland clients do not update their size when
> changing the scale factor. And then there is of course Xwayland.

The size is updated properly, only they are blurred. This is what this issue is
about.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Roman Gilg
https://bugs.kde.org/show_bug.cgi?id=425190

Roman Gilg  changed:

   What|Removed |Added

 CC||subd...@gmail.com

--- Comment #11 from Roman Gilg  ---
(In reply to Claudius Ellsel from comment #10)
> So when applying fractional scaling, say a factor of 1.25 the icons, mouse
> cursor etc. are not upscaled?

They are rendered at 2-times the normal size and then downscaled. That's the
theory, in practice there can always be issues.

I believe sometimes Qt Wayland clients do not update their size when changing
the scale factor. And then there is of course Xwayland.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #10 from Claudius Ellsel  ---
(In reply to Christoph Feck from comment #8)
> Is this with Wayland? KWin on X11 doesn't scale.

Yes this is on Wayland. As I said, this is about fractional scaling set in the
view settings. KWin might be the wrong product to file this.

(In reply to David Edmundson from comment #9)
> There is no upscaling. If there is you've got a different bug. Please check

So when applying fractional scaling, say a factor of 1.25 the icons, mouse
cursor etc. are not upscaled?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=425190

David Edmundson  changed:

   What|Removed |Added

 Status|REPORTED|NEEDSINFO
 CC||k...@davidedmundson.co.uk
 Resolution|--- |WAITINGFORINFO

--- Comment #9 from David Edmundson  ---
There is no upscaling. If there is you've got a different bug. Please check

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #8 from Christoph Feck  ---
Is this with Wayland? KWin on X11 doesn't scale.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=425190

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org

--- Comment #7 from Nate Graham  ---
This might be done at the Qt level, in fact. But I'll let the KWin developers
give you the truth since that's just speculation. :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #6 from Claudius Ellsel  ---
More general comparison and background:

- https://en.wikipedia.org/wiki/Comparison_gallery_of_image_scaling_algorithms
-
https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms#/media/File:Pixel-Art_Scaling_Comparison.png
- https://en.wikipedia.org/wiki/Image_scaling

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #3 from Claudius Ellsel  ---
Created attachment 130757
  --> https://bugs.kde.org/attachment.cgi?id=130757=edit
Cubic algorithm

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #5 from Claudius Ellsel  ---
Created attachment 130759
  --> https://bugs.kde.org/attachment.cgi?id=130759=edit
LoHalo algorithm

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #4 from Claudius Ellsel  ---
Created attachment 130758
  --> https://bugs.kde.org/attachment.cgi?id=130758=edit
NoHalo algorithm

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #1 from Claudius Ellsel  ---
Created attachment 130755
  --> https://bugs.kde.org/attachment.cgi?id=130755=edit
No algorithm for scaling selected

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 425190] Improve scaling of the desktop

2020-08-10 Thread Claudius Ellsel
https://bugs.kde.org/show_bug.cgi?id=425190

--- Comment #2 from Claudius Ellsel  ---
Created attachment 130756
  --> https://bugs.kde.org/attachment.cgi?id=130756=edit
Linear algorithm

-- 
You are receiving this mail because:
You are watching all bug changes.