Merge lp:~sil2100/compiz-core/cherry_3275 into lp:compiz-core

Proposed by Łukasz Zemczak
Status: Needs review
Proposed branch: lp:~sil2100/compiz-core/cherry_3275
Merge into: lp:compiz-core
Diff against target: 77 lines (+22/-6)
2 files modified
plugins/opengl/src/privatetexture.h (+2/-0)
plugins/opengl/src/texture.cpp (+20/-6)
To merge this branch: bzr merge lp:~sil2100/compiz-core/cherry_3275
Reviewer Review Type Date Requested Status
Daniel van Vugt Disapprove
Review via email: mp+115146@code.launchpad.net

Commit message

Cherry-picked from compiz trunk (rev 3275):

Wait for the server to finish processing requests before doing a bind (LP: #1016367).

Description of the change

Checking if this commit can be used for an SRU as well.

Cherry-picked from compiz trunk (rev 3275):

Wait for the server to finish processing requests before doing a bind (LP: #1016367).

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have suspected this fix of causing other regressions. So best to not backport it yet till I'm sure.

review: Disapprove

Unmerged revisions

3114. By Łukasz Zemczak

Cherry-picked from compiz trunk (rev 3275):

Wait for the server to finish processing requests before doing a bind (LP: #1016367).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/opengl/src/privatetexture.h'
2--- plugins/opengl/src/privatetexture.h 2012-01-18 16:26:45 +0000
3+++ plugins/opengl/src/privatetexture.h 2012-07-16 13:54:31 +0000
4@@ -68,6 +68,8 @@
5 ~TfpTexture ();
6
7 void enable (Filter filter);
8+ bool bindTexImage (const GLXPixmap &);
9+ void releaseTexImage ();
10
11 static List bindPixmapToTexture (Pixmap pixmap,
12 int width,
13
14=== modified file 'plugins/opengl/src/texture.cpp'
15--- plugins/opengl/src/texture.cpp 2012-01-19 18:12:31 +0000
16+++ plugins/opengl/src/texture.cpp 2012-07-16 13:54:31 +0000
17@@ -31,6 +31,7 @@
18 #include <stdlib.h>
19 #include <string.h>
20
21+#include <core/servergrab.h>
22 #include <opengl/texture.h>
23 #include <privatetexture.h>
24 #include "privates.h"
25@@ -429,7 +430,7 @@
26
27 glBindTexture (target (), name ());
28
29- (*GL::releaseTexImage) (screen->dpy (), pixmap, GLX_FRONT_LEFT_EXT);
30+ releaseTexImage ();
31
32 glBindTexture (target (), 0);
33 glDisable (target ());
34@@ -441,6 +442,21 @@
35 }
36 }
37
38+bool
39+TfpTexture::bindTexImage (const GLXPixmap &glxPixmap)
40+{
41+ ServerLock sg (screen->serverGrabInterface ());
42+ glXWaitX ();
43+ (*GL::bindTexImage) (screen->dpy (), glxPixmap, GLX_FRONT_LEFT_EXT, NULL);
44+ return true;
45+}
46+
47+void
48+TfpTexture::releaseTexImage ()
49+{
50+ (*GL::releaseTexImage) (screen->dpy (), pixmap, GLX_FRONT_LEFT_EXT);
51+}
52+
53 GLTexture::List
54 TfpTexture::bindPixmapToTexture (Pixmap pixmap,
55 int width,
56@@ -572,9 +588,7 @@
57
58 glBindTexture (texTarget, tex->name ());
59
60-
61- (*GL::bindTexImage) (screen->dpy (), glxPixmap, GLX_FRONT_LEFT_EXT, NULL);
62-
63+ tex->bindTexImage (glxPixmap);
64 tex->setFilter (GL_NEAREST);
65 tex->setWrap (GL_CLAMP_TO_EDGE);
66
67@@ -595,8 +609,8 @@
68
69 if (damaged && pixmap)
70 {
71- (*GL::releaseTexImage) (screen->dpy (), pixmap, GLX_FRONT_LEFT_EXT);
72- (*GL::bindTexImage) (screen->dpy (), pixmap, GLX_FRONT_LEFT_EXT, NULL);
73+ releaseTexImage ();
74+ bindTexImage (pixmap);
75 }
76
77 GLTexture::enable (filter);

Subscribers

People subscribed via source and target branches