Merge lp:~3v1n0/unity/no-coverflow-on-glsl into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2648
Proposed branch: lp:~3v1n0/unity/no-coverflow-on-glsl
Merge into: lp:unity
Diff against target: 27 lines (+3/-3)
1 file modified
dash/LensView.cpp (+3/-3)
To merge this branch: bzr merge lp:~3v1n0/unity/no-coverflow-on-glsl
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+122285@code.launchpad.net

Commit message

LensView: fallback to normal renderer (instead of Coverflow) if GLSL is not supported

Description of the change

Coverflow can't work in the cards that does not support GLSL, in that case we need to fallback to the default renderer.

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/LensView.cpp'
2--- dash/LensView.cpp 2012-08-28 14:35:16 +0000
3+++ dash/LensView.cpp 2012-08-31 14:05:26 +0000
4@@ -305,7 +305,7 @@
5 counts_[group] = 0;
6
7 ResultView* grid;
8-
9+
10 if (renderer_name == "tile-horizontal")
11 {
12 grid = new ResultViewGrid(NUX_TRACKER_LOCATION);
13@@ -313,12 +313,12 @@
14 static_cast<ResultViewGrid*> (grid)->horizontal_spacing = CARD_VIEW_GAP_HORIZ;
15 static_cast<ResultViewGrid*> (grid)->vertical_spacing = CARD_VIEW_GAP_VERT;
16 }
17- else if (renderer_name == "flow")
18+ else if (renderer_name == "flow" && nux::GetWindowThread()->GetGraphicsEngine().UsingGLSLCodePath())
19 {
20 grid = new CoverflowResultView(NUX_TRACKER_LOCATION);
21 grid->SetModelRenderer(new ResultRendererTile(NUX_TRACKER_LOCATION));
22 group->SetHeaderCountVisible(false);
23- }
24+ }
25 else
26 {
27 grid = new ResultViewGrid(NUX_TRACKER_LOCATION);