Merge lp:~fboucault/unity-2d/fix_use_opengl into lp:unity-2d

Proposed by Florian Boucault
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 772
Merged at revision: 772
Proposed branch: lp:~fboucault/unity-2d/fix_use_opengl
Merge into: lp:unity-2d
Diff against target: 44 lines (+9/-3)
3 files modified
launcher/app/launcher.cpp (+3/-1)
places/app/places.cpp (+3/-1)
spread/app/spread.cpp (+3/-1)
To merge this branch: bzr merge lp:~fboucault/unity-2d/fix_use_opengl
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Review via email: mp+81706@code.launchpad.net

Description of the change

D-Conf option 'use-opengl' was not taken into account because the absence of
command line parameter -opengl was overriding it.

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

Various indicators show that OpenGL is used:
- performance changes
- some bugs specific to the OpenGL backend appear (e.g. headers in the dash change position upon mouse hover)
- if run with QML_SHOW_FRAMERATE=1, the results differ greatly

Revision history for this message
Alberto Mardegan (mardy) wrote :

I'm ashamed of not having noticed this before. :-) Anyway, great fix!

review: Approve

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-09-20 08:40:43 +0000
3+++ launcher/app/launcher.cpp 2011-11-09 11:20:29 +0000
4@@ -99,7 +99,9 @@
5
6 /* QML declarative view */
7 LauncherView *launcherView = new LauncherView(&panel);
8- launcherView->setUseOpenGL(arguments.contains("-opengl"));
9+ if (arguments.contains("-opengl")) {
10+ launcherView->setUseOpenGL(true);
11+ }
12
13 launcherView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
14 launcherView->setFocus();
15
16=== modified file 'places/app/places.cpp'
17--- places/app/places.cpp 2011-09-20 08:40:43 +0000
18+++ places/app/places.cpp 2011-11-09 11:20:29 +0000
19@@ -48,7 +48,9 @@
20 qmlRegisterType<DashDeclarativeView>("Unity2d", 1, 0, "DashDeclarativeView");
21 DashDeclarativeView view;
22 view.setAccessibleName("Dash");
23- view.setUseOpenGL(arguments.contains("-opengl"));
24+ if (arguments.contains("-opengl")) {
25+ view.setUseOpenGL(true);
26+ }
27
28 if (!view.connectToBus()) {
29 qCritical() << "Another instance of the Dash already exists. Quitting.";
30
31=== modified file 'spread/app/spread.cpp'
32--- spread/app/spread.cpp 2011-08-09 17:06:35 +0000
33+++ spread/app/spread.cpp 2011-11-09 11:20:29 +0000
34@@ -39,7 +39,9 @@
35 QSet<QString> arguments = QSet<QString>::fromList(QCoreApplication::arguments());
36
37 SpreadView view;
38- view.setUseOpenGL(arguments.contains("-opengl"));
39+ if (arguments.contains("-opengl")) {
40+ view.setUseOpenGL(true);
41+ }
42
43 /* The spread window is borderless and not moveable by the user, yet not
44 fullscreen */

Subscribers

People subscribed via source and target branches