diff options
| author | jgc <jgc@eb2447ed-0c53-47e4-bac8-5bc4a241df78> | 2016-04-11 14:25:19 +0000 |
|---|---|---|
| committer | svntogit <svntogit@nymeria.archlinux.org> | 2016-04-11 14:25:19 +0000 |
| commit | 0e925c62bae1e4427bfe021e622f1e8fcb12eecd (patch) | |
| tree | a519940dd5f2f8544c7d4ac8edef21531ab1381e /trunk | |
| parent | 3a66232947aada9d45a0d59a8b89dbddd3e3b8ae (diff) | |
| download | packages-0e925c62bae1e4427bfe021e622f1e8fcb12eecd.tar.gz packages-0e925c62bae1e4427bfe021e622f1e8fcb12eecd.tar.xz | |
upgpkg: gnome-shell 3.20.0-3
Fix FS#48772
git-svn-id: file:///srv/repos/svn-packages/svn@264639 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Diffstat (limited to 'trunk')
| -rw-r--r-- | trunk/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch | 106 | ||||
| -rw-r--r-- | trunk/PKGBUILD | 11 |
2 files changed, 114 insertions, 3 deletions
diff --git a/trunk/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch b/trunk/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch new file mode 100644 index 00000000000..19eda8e82f7 --- /dev/null +++ b/trunk/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch @@ -0,0 +1,106 @@ +From 26d339b91744dab5135ee9ea1d46fda62448ad95 Mon Sep 17 00:00:00 2001 +From: Jan de Groot <jgc@archlinux.org> +Date: Mon, 11 Apr 2016 14:00:33 +0000 +Subject: [PATCH] Initialize framebuffer objects early so clutter will not + abort a few operations later. + +Checking offscreen for COGL_INVALID_HANDLE is not sufficient, as cogl_offscreen_new_with_texture doesn't initialize framebuffer objects but lets Cogl solve this the lazy way. cogl_offscreen_new_with_texture will never return COGL_INVALID_HANDLE anyways. +--- + src/st/st-theme-node-drawing.c | 35 +++++++++++++++++++++++------------ + src/st/st-theme-node-transition.c | 18 ++++++++++++++++-- + 2 files changed, 39 insertions(+), 14 deletions(-) + +diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c +index 1f28ed9..4a6a234 100644 +--- a/src/st/st-theme-node-drawing.c ++++ b/src/st/st-theme-node-drawing.c +@@ -2247,22 +2247,33 @@ st_theme_node_prerender_shadow (StThemeNodePaintState *state) + COGL_TEXTURE_NO_SLICING, + COGL_PIXEL_FORMAT_ANY); + if (buffer != COGL_INVALID_HANDLE) +- offscreen = cogl_offscreen_new_with_texture (buffer); +- +- if (offscreen != COGL_INVALID_HANDLE) + { +- ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; ++ CoglError *error = NULL; ++ ++ offscreen = cogl_offscreen_new_with_texture (buffer); ++ ++ if (cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error)) ++ { ++ ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; ++ ++ cogl_framebuffer_orthographic (offscreen, 0, 0, ++ state->box_shadow_width, ++ state->box_shadow_height, 0, 1.0); ++ cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); + +- cogl_framebuffer_orthographic (offscreen, 0, 0, +- state->box_shadow_width, +- state->box_shadow_height, 0, 1.0); +- cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); ++ st_theme_node_paint_borders (state, offscreen, &box, 0xFF); + +- st_theme_node_paint_borders (state, offscreen, &box, 0xFF); +- cogl_handle_unref (offscreen); ++ cogl_handle_unref (offscreen); + +- state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), +- buffer); ++ state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), ++ buffer); ++ } ++ else ++ { ++ cogl_handle_unref (offscreen); ++ ++ cogl_error_free (error); ++ } + } + + if (buffer != COGL_INVALID_HANDLE) +diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c +index 1eef17b..f3350a1 100644 +--- a/src/st/st-theme-node-transition.c ++++ b/src/st/st-theme-node-transition.c +@@ -242,6 +242,8 @@ setup_framebuffers (StThemeNodeTransition *transition, + StThemeNodeTransitionPrivate *priv = transition->priv; + guint width, height; + ++ CoglError *catch_error = NULL; ++ + /* template material to avoid unnecessary shader compilation */ + static CoglHandle material_template = COGL_INVALID_HANDLE; + +@@ -269,13 +271,25 @@ setup_framebuffers (StThemeNodeTransition *transition, + if (priv->old_offscreen) + cogl_handle_unref (priv->old_offscreen); + priv->old_offscreen = cogl_offscreen_new_with_texture (priv->old_texture); ++ if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->old_offscreen), &catch_error)) ++ { ++ cogl_object_unref (priv->old_offscreen); ++ cogl_error_free (catch_error); ++ priv->old_offscreen = COGL_INVALID_HANDLE; ++ g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE); ++ } + + if (priv->new_offscreen) + cogl_handle_unref (priv->new_offscreen); + priv->new_offscreen = cogl_offscreen_new_with_texture (priv->new_texture); + +- g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE); +- g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE); ++ if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->new_offscreen), &catch_error)) ++ { ++ cogl_object_unref (priv->new_offscreen); ++ cogl_error_free (catch_error); ++ priv->new_offscreen = COGL_INVALID_HANDLE; ++ g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE); ++ } + + if (priv->material == NULL) + { +-- +2.7.1 + diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index da7287e8720..07876e46477 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -4,7 +4,7 @@ pkgname=gnome-shell pkgver=3.20.0 -pkgrel=2 +pkgrel=3 pkgdesc="The next generation GNOME Shell" arch=(i686 x86_64) url="https://wiki.gnome.org/Projects/GnomeShell" @@ -20,10 +20,12 @@ install=gnome-shell.install groups=(gnome) source=(https://download.gnome.org/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz nm-libexecdir.patch - offscreen-memleak.patch) + offscreen-memleak.patch + 0001-Initialize-framebuffer-objects-early-so-clutter-will.patch) sha256sums=('ee69f461dd3d03caf788dfc64241275868ec0bcd1ef814f3cd2803c25796b888' 'e5bb10ad2e5c3e0fde3d05babd1bfdda701e553e02d493f7e54cb7832ce7e607' - '38bf66da2d92dbb3eab90d36feba0b1af65fe476d2982989dccd799aec0125a6') + '38bf66da2d92dbb3eab90d36feba0b1af65fe476d2982989dccd799aec0125a6' + '4dfd8a416fafdfa53ff07fd0433d5785f7bf434d3e576710879bfca5fe39c84f') prepare() { cd $pkgname-$pkgver @@ -33,6 +35,9 @@ prepare() { # Fix memleak patch -Np1 -i ../offscreen-memleak.patch + + # Catch FBO allocation failure + patch -Np1 -i ../0001-Initialize-framebuffer-objects-early-so-clutter-will.patch } build() { |