Merge lp://staging/~mc-return/compiz/compiz.merge-fix1173914-low-res-non-power-of-2-icon-texture-res into lp://staging/compiz/0.9.10
Status: | Merged |
---|---|
Approved by: | Sam Spilsbury |
Approved revision: | 3691 |
Merged at revision: | 3695 |
Proposed branch: | lp://staging/~mc-return/compiz/compiz.merge-fix1173914-low-res-non-power-of-2-icon-texture-res |
Merge into: | lp://staging/compiz/0.9.10 |
Diff against target: |
135 lines (+13/-11) 9 files modified
plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h (+1/-1) plugins/compiztoolbox/src/compiztoolbox.cpp (+2/-2) plugins/kdecompat/src/kdecompat.cpp (+1/-1) plugins/ring/src/ring.cpp (+2/-2) plugins/scale/src/scale.cpp (+1/-1) plugins/shift/src/shift.cpp (+1/-1) plugins/stackswitch/src/stackswitch.cpp (+2/-2) plugins/staticswitcher/src/staticswitcher.cpp (+2/-0) plugins/staticswitcher/src/staticswitcher.h (+1/-1) |
To merge this branch: | bzr merge lp://staging/~mc-return/compiz/compiz.merge-fix1173914-low-res-non-power-of-2-icon-texture-res |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Sam Spilsbury | Approve | ||
MC Return | Needs Information | ||
Review via email: mp+161324@code.staging.launchpad.net |
Commit message
Ring, Shift and Stack Window Switcher:
Increased the non-power-of-2 icon texture resolution from 96x96 to 512x512 pixels,
in the case of the ring switcher from 64 to 512.
Static Switcher:
Replaced #define of MAX_ICON_SIZE with type-safe extern const unsigned short and
set the icon resolution to 512 as well.
Compiztoolbox:
Increased the non-power-of-2 icon texture resolution const unsigned short ICON_SIZE
from 48 to 512 and const unsigned int MAX_ICON_SIZE from 256 to 512 as well.
Changed the type of MAX_ICON_SIZE from const unsigned int to const unsigned short.
Scale:
Increased the non-power-of-2 icon texture resolution from 96x96 to 512x512 pixels.
KDE Compatibility:
Increased the icon texture resolution from 256x256 to 512x512 pixels.
(LP: #1173914)
Description of the change
1. Texture sizes should *always* be power-of-2, otherwise they will be internally upscaled to the next higher power-of-2 resolution, which means this comes with a loss of quality (with all the known scaling issues).
Non-power-of-2 resolutions should *never* be used for textures.
Example: 96x96 becomes 128x128 internally, so the 96 pixels have to be upscaled to 128, which creates scaling artifacts.
2. 96x96 or even lower sizes are not good sizes for icons, especially if they get upscaled to 50% of the screen width in the case of "Big" overlay icon modes of our Switchers (Shift, Stack, Ring) - please see bug #1173694 for details on this issue.
[Solution]
We should increase the icon texture sizes to at least 256x256, which is quite the standard in 2013.
We should investigate if we could force Compiz to load the .svg version of the icon, if available, because vectorgraphics could be scaled without any artifacts.
* IMPORTANT NOTE *:
===================
This MP does unfortunately *not* fix bug #1173916 and bug #1173694 (which are also icon related), but it is a first step.
"Non-power-of-2 resolutions should *never* be used for textures.
Example: 96x96 becomes 128x128 internally, so the 96 pixels have to be upscaled to 128, which creates scaling artifacts."
Most hardware supports non-power-of-two textures. I have not heard of any hardware that does internal upscaling.
In any case, there is no difference between MAX_ICON_SIZE and ICON_SIZE. The constant can be the same - 512 everywhere. CompWindow::getIcon () will go for the largest sized icon first and then smaller ones after that.