~ubuntu-branches/debian/jessie/gnome-shell/jessie

« back to all changes in this revision

Viewing changes to debian/patches/14_make-GLX-optional.patch

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-05-30 20:56:52 UTC
  • Revision ID: package-import@ubuntu.com-20120530205652-cr4w3zus93e5ac7a
Tags: 3.4.1-5
Disabling the screen recorder on arm{el,hf} was not sufficient to make it
build everywhere since the screen grabber is also used for making
screenshots. Update debian/patches/14_make-GLX-optional.patch instead and
only use pixel buffers in the screen grabber if we have GL/GLX support.
This means we can re-enable the screen recorder on arm{el,hf} as it will
use the slow, cogl-based path there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670850
5
5
Index: gnome-shell-3.4.1/configure.ac
6
6
===================================================================
7
 
--- gnome-shell-3.4.1.orig/configure.ac 2012-05-30 14:28:01.846358885 +0200
8
 
+++ gnome-shell-3.4.1/configure.ac      2012-05-30 14:28:31.070357778 +0200
 
7
--- gnome-shell-3.4.1.orig/configure.ac 2012-05-30 20:30:08.173590415 +0200
 
8
+++ gnome-shell-3.4.1/configure.ac      2012-05-30 20:30:08.741590395 +0200
 
9
@@ -50,7 +50,7 @@
 
10
    AC_MSG_RESULT(yes)
 
11
    build_recorder=true
 
12
    recorder_modules="gstreamer-0.10 gstreamer-base-0.10 x11"
 
13
-   PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
 
14
+   PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes)
 
15
 else
 
16
    AC_MSG_RESULT(no)
 
17
 fi
9
18
@@ -82,7 +82,6 @@
10
19
                                gjs-internals-1.0 >= $GJS_MIN_VERSION
11
20
                               libgnome-menu-3.0 $recorder_modules
14
23
                               clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
15
24
                               clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
16
25
                                libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
17
 
@@ -133,6 +132,14 @@
 
26
@@ -133,6 +132,16 @@
18
27
 
19
28
 PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2)
20
29
 
22
31
+if test "x$have_glx" = "xyes"; then
23
32
+   GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $GLX_CFLAGS"
24
33
+   GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $GLX_LIBS"
 
34
+   TEST_SHELL_RECORDER_CFLAGS="$TEST_SHELL_RECORDER_CFLAGS $GLX_CFLAGS"
 
35
+   TEST_SHELL_RECORDER_LIBS="$TEST_SHELL_RECORDER_LIBS $GLX_LIBS"
25
36
+   AC_DEFINE(HAVE_GLX, [1], [Define if we have GLX])
26
37
+   AC_SUBST([HAVE_GLX], [1])
27
38
+fi
31
42
 AC_SUBST([GJS_VERSION], ["$GJS_VERSION"])
32
43
Index: gnome-shell-3.4.1/src/gnome-shell-plugin.c
33
44
===================================================================
34
 
--- gnome-shell-3.4.1.orig/src/gnome-shell-plugin.c     2012-05-30 14:27:55.946359089 +0200
35
 
+++ gnome-shell-3.4.1/src/gnome-shell-plugin.c  2012-05-30 14:28:12.710358506 +0200
 
45
--- gnome-shell-3.4.1.orig/src/gnome-shell-plugin.c     2012-03-09 22:42:49.000000000 +0100
 
46
+++ gnome-shell-3.4.1/src/gnome-shell-plugin.c  2012-05-30 20:30:08.741590395 +0200
36
47
@@ -30,8 +30,10 @@
37
48
 
38
49
 #include <clutter/clutter.h>
44
55
 #include <gjs/gjs.h>
45
56
 #include <meta/display.h>
46
57
 #include <meta/meta-plugin.h>
47
 
@@ -146,14 +148,19 @@
 
58
@@ -146,14 +148,17 @@
48
59
 gnome_shell_plugin_start (MetaPlugin *plugin)
49
60
 {
50
61
   GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
52
63
   MetaScreen *screen;
53
64
   MetaDisplay *display;
54
65
   Display *xdisplay;
 
66
+  const char *glx_extensions;
55
67
+#endif
56
68
   GError *error = NULL;
57
69
   int status;
58
 
+#ifdef HAVE_GLX
59
 
   const char *glx_extensions;
60
 
+#endif
 
70
-  const char *glx_extensions;
61
71
   GjsContext *gjs_context;
62
72
 
63
73
+#ifdef HAVE_GLX
64
74
   screen = meta_plugin_get_screen (plugin);
65
75
   display = meta_screen_get_display (screen);
66
76
 
67
 
@@ -166,6 +173,9 @@
 
77
@@ -166,6 +171,9 @@
68
78
   glx_extensions = glXQueryExtensionsString (xdisplay,
69
79
                                              meta_screen_get_screen_number (screen));
70
80
   shell_plugin->have_swap_event = strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
74
84
 
75
85
   shell_perf_log_define_event (shell_perf_log_get_default (),
76
86
                                "glx.swapComplete",
 
87
Index: gnome-shell-3.4.1/src/shell-screen-grabber.c
 
88
===================================================================
 
89
--- gnome-shell-3.4.1.orig/src/shell-screen-grabber.c   2012-03-02 13:28:41.000000000 +0100
 
90
+++ gnome-shell-3.4.1/src/shell-screen-grabber.c        2012-05-30 20:30:55.781588732 +0200
 
91
@@ -1,21 +1,27 @@
 
92
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
93
 
 
94
+#include "config.h"
 
95
+
 
96
 #include <string.h>
 
97
 
 
98
 #include <clutter/clutter.h>
 
99
 #include <cogl/cogl.h>
 
100
+#ifdef HAVE_GLX
 
101
 #include <GL/gl.h>
 
102
 #include <GL/glx.h>
 
103
 #include <GL/glext.h>
 
104
+#endif
 
105
 
 
106
 #include "shell-screen-grabber.h"
 
107
 
 
108
+#ifdef HAVE_GLX
 
109
 PFNGLBINDBUFFERARBPROC pf_glBindBufferARB;
 
110
 PFNGLBUFFERDATAARBPROC pf_glBufferDataARB;
 
111
 PFNGLDELETEBUFFERSARBPROC pf_glDeleteBuffersARB;
 
112
 PFNGLGENBUFFERSARBPROC pf_glGenBuffersARB;
 
113
 PFNGLMAPBUFFERARBPROC pf_glMapBufferARB;
 
114
 PFNGLUNMAPBUFFERARBPROC pf_glUnmapBufferARB;
 
115
+#endif
 
116
 
 
117
 struct _ShellScreenGrabberClass
 
118
 {
 
119
@@ -39,8 +45,10 @@
 
120
 {
 
121
   ShellScreenGrabber *grabber = SHELL_SCREEN_GRABBER (gobject);
 
122
 
 
123
+#ifdef HAVE_GLX
 
124
   if (grabber->pixel_buffer != 0)
 
125
     pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
 
126
+#endif
 
127
 }
 
128
 
 
129
 static void
 
130
@@ -95,6 +103,7 @@
 
131
   data_size = row_bytes * height;
 
132
   data = g_malloc (data_size);
 
133
 
 
134
+#ifdef HAVE_GLX
 
135
   if (grabber->have_pixel_buffers == -1)
 
136
     {
 
137
       const GLubyte* extensions = glGetString (GL_EXTENSIONS);
 
138
@@ -198,6 +207,7 @@
 
139
         glPixelStorei (GL_PACK_INVERT_MESA, old_pack_invert);
 
140
     }
 
141
   else
 
142
+#endif /* HAVE_GLX */
 
143
     {
 
144
       cogl_read_pixels (x, y,
 
145
                         width, height,