Magellan Linux

Annotation of /trunk/compiz/patches/compiz-aiglx-changes-20060412.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (hide annotations) (download)
Tue May 8 20:06:05 2007 UTC (17 years ago) by niro
File size: 5424 byte(s)
-import

1 niro 144 Index: include/compiz.h
2     ===================================================================
3     RCS file: /cvs/xorg/app/compiz/include/compiz.h,v
4     retrieving revision 1.26
5     diff -u -r1.26 compiz.h
6     --- include/compiz.h 10 Apr 2006 22:17:28 -0000 1.26
7     +++ include/compiz.h 11 Apr 2006 22:08:15 -0000
8     @@ -879,7 +879,8 @@
9     CompTextureFilter filter);
10    
11     void
12     -disableTexture (CompTexture *texture);
13     +disableTexture (CompScreen *screen,
14     + CompTexture *texture);
15    
16    
17     /* screen.c */
18     Index: plugins/cube.c
19     ===================================================================
20     RCS file: /cvs/xorg/app/compiz/plugins/cube.c,v
21     retrieving revision 1.8
22     diff -u -r1.8 cube.c
23     --- plugins/cube.c 9 Apr 2006 21:14:17 -0000 1.8
24     +++ plugins/cube.c 11 Apr 2006 22:08:18 -0000
25     @@ -593,7 +593,7 @@
26    
27     glEnd ();
28    
29     - disableTexture (&cs->sky);
30     + disableTexture (s, &cs->sky);
31    
32     glEndList ();
33    
34     @@ -859,7 +859,7 @@
35     enableTexture (s, &cs->texture, COMP_TEXTURE_FILTER_GOOD);
36     glTexCoordPointer (2, GL_FLOAT, 0, cs->tc);
37     glDrawArrays (GL_TRIANGLE_FAN, 0, cs->nvertices >> 1);
38     - disableTexture (&cs->texture);
39     + disableTexture (s, &cs->texture);
40     }
41     else
42     glDrawArrays (GL_TRIANGLE_FAN, 0, cs->nvertices >> 1);
43     Index: plugins/water.c
44     ===================================================================
45     RCS file: /cvs/xorg/app/compiz/plugins/water.c,v
46     retrieving revision 1.11
47     diff -u -r1.11 water.c
48     --- plugins/water.c 8 Apr 2006 15:07:58 -0000 1.11
49     +++ plugins/water.c 11 Apr 2006 22:08:27 -0000
50     @@ -1222,7 +1222,7 @@
51    
52     glBindTexture (ws->target, 0);
53     (*w->screen->activeTexture) (GL_TEXTURE0_ARB);
54     - disableTexture (texture);
55     + disableTexture (w->screen, texture);
56    
57     glPopMatrix ();
58    
59     Index: src/display.c
60     ===================================================================
61     RCS file: /cvs/xorg/app/compiz/src/display.c,v
62     retrieving revision 1.13
63     diff -u -r1.13 display.c
64     --- src/display.c 10 Apr 2006 22:17:28 -0000 1.13
65     +++ src/display.c 11 Apr 2006 22:08:31 -0000
66     @@ -1187,7 +1187,7 @@
67    
68     EMPTY_REGION (s->damage);
69    
70     - if (s->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK)
71     + if (1) //s->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK)
72     {
73     s->damageMask = 0;
74    
75     Index: src/paint.c
76     ===================================================================
77     RCS file: /cvs/xorg/app/compiz/src/paint.c,v
78     retrieving revision 1.5
79     diff -u -r1.5 paint.c
80     --- src/paint.c 29 Mar 2006 12:18:26 -0000 1.5
81     +++ src/paint.c 11 Apr 2006 22:08:33 -0000
82     @@ -623,7 +623,7 @@
83    
84     (*w->screen->drawWindowGeometry) (w);
85    
86     - disableTexture (texture);
87     + disableTexture (w->screen, texture);
88    
89     glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
90    
91     @@ -634,7 +634,7 @@
92     (*w->screen->drawWindowGeometry) (w);
93     }
94    
95     - disableTexture (texture);
96     + disableTexture (w->screen, texture);
97    
98     glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
99    
100     @@ -661,13 +661,13 @@
101     (*w->screen->drawWindowGeometry) (w);
102     }
103    
104     - disableTexture (texture);
105     + disableTexture (w->screen, texture);
106    
107     glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
108    
109     w->screen->activeTexture (GL_TEXTURE0_ARB);
110    
111     - disableTexture (texture);
112     + disableTexture (w->screen, texture);
113    
114     glColor4usv (defaultColor);
115     screenTexEnvMode (w->screen, GL_REPLACE);
116     @@ -719,7 +719,7 @@
117     (*w->screen->drawWindowGeometry) (w);
118     }
119    
120     - disableTexture (texture);
121     + disableTexture (w->screen, texture);
122     }
123    
124     glPopMatrix ();
125     @@ -857,7 +857,7 @@
126    
127     glDrawArrays (GL_QUADS, 0, nBox * 4);
128    
129     - disableTexture (bg);
130     + disableTexture (s, bg);
131     }
132    
133     if (mask & PAINT_BACKGROUND_WITH_STENCIL_MASK)
134     Index: src/screen.c
135     ===================================================================
136     RCS file: /cvs/xorg/app/compiz/src/screen.c,v
137     retrieving revision 1.23
138     diff -u -r1.23 screen.c
139     --- src/screen.c 11 Apr 2006 07:49:48 -0000 1.23
140     +++ src/screen.c 11 Apr 2006 22:08:35 -0000
141     @@ -1060,7 +1060,8 @@
142    
143     XFree (visinfo);
144    
145     - glxExtensions = glXQueryExtensionsString (s->display->display, screenNum);
146     + glxExtensions = glXQueryServerString (s->display->display,
147     + screenNum, GLX_EXTENSIONS);
148     if (!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap"))
149     {
150     fprintf (stderr, "%s: GLX_EXT_texture_from_pixmap is missing\n",
151     Index: src/texture.c
152     ===================================================================
153     RCS file: /cvs/xorg/app/compiz/src/texture.c,v
154     retrieving revision 1.7
155     diff -u -r1.7 texture.c
156     --- src/texture.c 9 Apr 2006 18:06:44 -0000 1.7
157     +++ src/texture.c 11 Apr 2006 22:08:36 -0000
158     @@ -335,6 +335,19 @@
159     glEnable (texture->target);
160     glBindTexture (texture->target, texture->name);
161    
162     + if (!screen->bindTexImage (screen->display->display,
163     + texture->pixmap,
164     + GLX_FRONT_LEFT_EXT,
165     + NULL))
166     + {
167     + fprintf (stderr, "%s: glXBindTexImage failed\n", programName);
168     +
169     + glXDestroyGLXPixmap (screen->display->display, texture->pixmap);
170     + texture->pixmap = None;
171     +
172     + return;
173     + }
174     +
175     if (filter == COMP_TEXTURE_FILTER_FAST)
176     {
177     if (texture->filter != GL_NEAREST)
178     @@ -399,8 +412,14 @@
179     }
180    
181     void
182     -disableTexture (CompTexture *texture)
183     +disableTexture (CompScreen *screen, CompTexture *texture)
184     {
185     + glBindTexture (texture->target, texture->name);
186     +
187     + screen->releaseTexImage (screen->display->display,
188     + texture->pixmap,
189     + GLX_FRONT_LEFT_EXT);
190     +
191     glBindTexture (texture->target, 0);
192     glDisable (texture->target);
193     }