Merge lp:~fboucault/unity-2d/dont_set_colorspec into lp:unity-2d/3.0

Proposed by Florian Boucault
Status: Merged
Approved by: Florian Boucault
Approved revision: 447
Merged at revision: 468
Proposed branch: lp:~fboucault/unity-2d/dont_set_colorspec
Merge into: lp:unity-2d/3.0
Diff against target: 42 lines (+8/-8)
2 files modified
launcher/app/launcher.cpp (+4/-4)
panel/app/main.cpp (+4/-4)
To merge this branch: bzr merge lp:~fboucault/unity-2d/dont_set_colorspec
Reviewer Review Type Date Requested Status
Olivier Tilloy Pending
Review via email: mp+53159@code.launchpad.net

Description of the change

[launcher & panel] Do not call QApplication::setColorSpec that is leading to visual artifacts appearing sometimes.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

Warning: this might not be finished work.

1) We need to see how many people are affected by the bug https://bugs.launchpad.net/unity-2d/+bug/734143
2) We need to find a proper fix for the color banding that the code removed by this MR was supposed to fix (ref: https://bugs.launchpad.net/unity-2d/+bug/674484)

Revision history for this message
Florian Boucault (fboucault) wrote :

> Warning: this might not be finished work.
>
> 1) We need to see how many people are affected by the bug
> https://bugs.launchpad.net/unity-2d/+bug/734143

Apparently I am not the only one with these issues.

> 2) We need to find a proper fix for the color banding that the code removed by
> this MR was supposed to fix (ref: https://bugs.launchpad.net/unity-
> 2d/+bug/674484)

Bug is now reopened.

Let's merge that as soon as possible.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Disclaimer: I’m running Maverick natively on a Macbook 5.1 with an NVIDIA GeForce 9400M, and I have never observed the issue this merge request is meant to address.

> > Warning: this might not be finished work.
> >
> > 1) We need to see how many people are affected by the bug
> > https://bugs.launchpad.net/unity-2d/+bug/734143
>
> Apparently I am not the only one with these issues.

Do we have more data on who is affected, and how badly? Is it 'only' a bug in the NVIDIA driver, or does it affect other hardware configurations? Such information should be gathered in the bug report.

> > 2) We need to find a proper fix for the color banding that the code removed
> by
> > this MR was supposed to fix (ref: https://bugs.launchpad.net/unity-
> > 2d/+bug/674484)
>
> Bug is now reopened.
>
> Let's merge that as soon as possible.

I may be missing the broader picture, but reading the documentation (http://doc.qt.nokia.com/qapplication.html#setColorSpec), I don’t understand how setting the colour specification to ManyColor could possibly trigger direct rendering issues. This is obviously a bug lower down the stack. Do we have a reference to a similar known issue? Any hope of a fix that doesn’t involve hacks on our side?

Ultimately, it looks to me like a trade-off between getting the colours right on some ARM platforms, or avoiding this black-boxes bug. Do we really want to favour the latter? If so I guess your fix is correct and can be merged (see my disclaimer though).

Revision history for this message
Florian Boucault (fboucault) wrote :

Thank you Olivier.

I'll take responsibility for that trade-off.

https://bugs.launchpad.net/unity-2d/+bug/674484 is reopened to deal with the color banding.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/app/launcher.cpp'
2--- launcher/app/launcher.cpp 2011-03-07 14:52:11 +0000
3+++ launcher/app/launcher.cpp 2011-03-13 04:12:18 +0000
4@@ -55,13 +55,13 @@
5
6 /* Forcing graphics system to 'raster' instead of the default 'native'
7 which on X11 is 'XRender'.
8- 'XRender' defaults to using a TrueColor visual. We mimick that behaviour
9- with 'raster' by calling QApplication::setColorSpec.
10+ 'XRender' defaults to using a TrueColor visual. We do _not_ mimick that
11+ behaviour with 'raster' by calling QApplication::setColorSpec because
12+ of a bug where black rectangular artifacts were appearing randomly:
13
14- Reference: https://bugs.launchpad.net/upicek/+bug/674484
15+ https://bugs.launchpad.net/unity-2d/+bug/734143
16 */
17 QApplication::setGraphicsSystem("raster");
18- QApplication::setColorSpec(QApplication::ManyColor);
19 Unity2dApplication application(argc, argv);
20
21 GnomeSessionClient client(INSTALL_PREFIX "/share/applications/unity-2d-launcher.desktop");
22
23=== modified file 'panel/app/main.cpp'
24--- panel/app/main.cpp 2011-03-07 14:52:11 +0000
25+++ panel/app/main.cpp 2011-03-13 04:12:18 +0000
26@@ -93,13 +93,13 @@
27
28 /* Forcing graphics system to 'raster' instead of the default 'native'
29 which on X11 is 'XRender'.
30- 'XRender' defaults to using a TrueColor visual. We mimick that behaviour
31- with 'raster' by calling QApplication::setColorSpec.
32+ 'XRender' defaults to using a TrueColor visual. We do _not_ mimick that
33+ behaviour with 'raster' by calling QApplication::setColorSpec because
34+ of a bug where black rectangular artifacts were appearing randomly:
35
36- Reference: https://bugs.launchpad.net/upicek/+bug/674484
37+ https://bugs.launchpad.net/unity-2d/+bug/734143
38 */
39 QApplication::setGraphicsSystem("raster");
40- QApplication::setColorSpec(QApplication::ManyColor);
41 Unity2dApplication app(argc, argv);
42 QApplication::setStyle(new Unity2dStyle);
43

Subscribers

People subscribed via source and target branches