Merge lp:~azzar1/unity/lp-1485727 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Eleni Maria Stea
Approved revision: no longer in the source branch.
Merged at revision: 4011
Proposed branch: lp:~azzar1/unity/lp-1485727
Merge into: lp:unity
Diff against target: 30 lines (+4/-3)
1 file modified
plugins/unityshell/src/unityshell.cpp (+4/-3)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1485727
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Eleni Maria Stea (community) Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+271207@code.launchpad.net

Commit message

Make sure to restore the state before the call to glDisable(GL_SCISSOR_TEST).

Description of the change

So basically the problem was that we were calling restore_state() after the call to glDisable(GL_SCISSOR_TEST). Because we want to be sure that GL_SCISSOR_TEST is diabled we need to do that after calling restore_state().

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Yes, WorksForMe!

Waiting Eleni for final approval.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Hey, good job! That 2D clipping again... :)

Just a minor "fix": http://pastebin.ubuntu.com/12425108/

It's better to push the Modelview matrix at the end of save_state() to avoid the double call to glMatrixMode. The result will be exactly the same.

Apart from that, cool! :-D

review: Needs Fixing
Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Hey, good job! That 2D clipping again... :)
>
> Just a minor "fix": http://pastebin.ubuntu.com/12425108/
>
> It's better to push the Modelview matrix at the end of save_state() to avoid
> the double call to glMatrixMode. The result will be exactly the same.
>
> Apart from that, cool! :-D

Done!

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Cool! :D

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2015-09-10 15:37:40 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2015-09-16 15:13:34 +0000
4@@ -91,12 +91,12 @@
5 #ifndef USE_GLES
6 glPushAttrib(GL_ALL_ATTRIB_BITS);
7
8- glMatrixMode(GL_MODELVIEW);
9- glPushMatrix();
10 glMatrixMode(GL_PROJECTION);
11 glPushMatrix();
12 glMatrixMode(GL_TEXTURE);
13 glPushMatrix();
14+ glMatrixMode(GL_MODELVIEW);
15+ glPushMatrix();
16 #endif
17 }
18
19@@ -687,9 +687,10 @@
20 glDepthRangef(0, 1);
21 #endif
22
23+ restore_state();
24+
25 gScreen->resetRasterPos();
26 glDisable(GL_SCISSOR_TEST);
27- restore_state();
28 }
29
30 void UnityScreen::setPanelShadowMatrix(GLMatrix const& matrix)