Merge lp:~compiz-team/compiz/compiz.fix_1056645 into lp:compiz/0.9.8

Proposed by Sam Spilsbury
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3396
Merged at revision: 3397
Proposed branch: lp:~compiz-team/compiz/compiz.fix_1056645
Merge into: lp:compiz/0.9.8
Diff against target: 53 lines (+15/-5)
1 file modified
plugins/opengl/src/screen.cpp (+15/-5)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.fix_1056645
Reviewer Review Type Date Requested Status
jenkins (community) continuous-integration Needs Fixing
Daniel van Vugt Approve
Review via email: mp+126399@code.launchpad.net

Commit message

Fix build error: "'swapInterval' is not a member of 'GL'" on USE_GLES
(LP: #1056645)

Description of the change

Fix FTBFS

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

/home/dan/bzr/compiz/tmp.645/plugins/opengl/src/screen.cpp: In function ‘void GL::waitForVideoSync()’:
/home/dan/bzr/compiz/tmp.645/plugins/opengl/src/screen.cpp:1722:21: error: too few arguments to function ‘void GL::fastSwapInterval(Display*, int)’
/home/dan/bzr/compiz/tmp.645/plugins/opengl/src/screen.cpp:1694:1: note: declared here

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, please give a commit comment with some details from the bug title.

3396. By Sam Spilsbury

Missing in one other place

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

fixed.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Alright, looks good now.

review: Approve
Revision history for this message
jenkins (martin-mrazik+qa) 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/opengl/src/screen.cpp'
2--- plugins/opengl/src/screen.cpp 2012-09-26 04:29:52 +0000
3+++ plugins/opengl/src/screen.cpp 2012-09-26 08:00:29 +0000
4@@ -1691,12 +1691,22 @@
5 {
6
7 void
8-fastSwapInterval (int interval)
9+fastSwapInterval (Display *dpy, int interval)
10 {
11 static int prev = -1;
12- if (GL::swapInterval && interval != prev)
13+#ifndef USE_GLES
14+ bool hasSwapInterval = GL::swapInterval ? true : false;
15+#else
16+ bool hasSwapInterval = true;
17+#endif
18+
19+ if (hasSwapInterval && interval != prev)
20 {
21+#ifndef USE_GLES
22 (*GL::swapInterval) (interval);
23+#else
24+ eglSwapInterval (eglGetDisplay (dpy), interval);
25+#endif
26 prev = interval;
27 }
28 }
29@@ -1709,7 +1719,7 @@
30 if (GL::waitVideoSync)
31 {
32 // Don't wait twice. Just in case.
33- fastSwapInterval (0);
34+ fastSwapInterval (screen->dpy (), 0);
35
36 /*
37 * While glXSwapBuffers/glXCopySubBufferMESA are meant to do a
38@@ -1738,13 +1748,13 @@
39 // Docs: http://www.opengl.org/registry/specs/SGI/swap_control.txt
40 if (GL::swapInterval)
41 {
42- fastSwapInterval (sync ? 1 : 0);
43+ fastSwapInterval (screen->dpy (), sync ? 1 : 0);
44 GL::unthrottledFrames++;
45 }
46 else if (sync)
47 waitForVideoSync ();
48 #else
49- eglSwapInterval (eglGetDisplay (screen->dpy ()), sync ? 1 : 0);
50+ fastSwapInterval (screen->dpy (), sync ? 1 : 0);
51 GL::unthrottledFrames++;
52 #endif
53 }

Subscribers

People subscribed via source and target branches