Accepting request 383754 from GNOME:Factory

1

OBS-URL: https://build.opensuse.org/request/show/383754
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-shell?expand=0&rev=112
This commit is contained in:
Dominique Leuenberger 2016-04-07 11:36:19 +00:00 committed by Git OBS Bridge
commit 96d344d221
3 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,66 @@
From 4a8b9d62c98539972cf553fa8101567ce37d73c4 Mon Sep 17 00:00:00 2001
From: Aaron Plattner <aplattner@nvidia.com>
Date: Fri, 18 Mar 2016 16:00:05 -0700
Subject: [PATCH] st: Fix offscreen leak if cogl_framebuffer_allocate fails
X-NVConfidentiality: public
If cogl_framebuffer_allocate fails in _st_create_shadow_pipeline_from_actor, the
CoglOffscreen* that was allocated earlier in the function is leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=735705
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
---
src/st/st-private.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/st/st-private.c b/src/st/st-private.c
index 559336c42d15..d40eceb86c78 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -425,40 +425,41 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec,
clutter_actor_get_allocation_box (actor, &box);
clutter_actor_box_get_size (&box, &width, &height);
if (width == 0 || height == 0)
return NULL;
buffer = cogl_texture_new_with_size (width,
height,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_ANY);
if (buffer == NULL)
return NULL;
offscreen = cogl_offscreen_new_with_texture (buffer);
fb = COGL_FRAMEBUFFER (offscreen);
if (!cogl_framebuffer_allocate (fb, &catch_error))
{
cogl_error_free (catch_error);
+ cogl_object_unref (offscreen);
cogl_object_unref (buffer);
return NULL;
}
cogl_color_init_from_4ub (&clear_color, 0, 0, 0, 0);
/* XXX: There's no way to render a ClutterActor to an offscreen
* as it uses the implicit API. */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
cogl_push_framebuffer (fb);
G_GNUC_END_IGNORE_DEPRECATIONS;
cogl_framebuffer_clear (fb, COGL_BUFFER_BIT_COLOR, &clear_color);
cogl_framebuffer_translate (fb, -box.x1, -box.y1, 0);
cogl_framebuffer_orthographic (fb, 0, 0, width, height, 0, 1.0);
clutter_actor_set_opacity_override (actor, 255);
clutter_actor_paint (actor);
clutter_actor_set_opacity_override (actor, -1);
--
2.7.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 31 13:07:40 UTC 2016 - zaitor@opensuse.org
- Add gnome-shell-Fix-offscreen-leak.patch: Fix offscreen leak if
cogl_framebuffer_allocate fails (bgo#735705).
-------------------------------------------------------------------
Wed Mar 23 08:16:13 UTC 2016 - dimstar@opensuse.org

View File

@ -26,6 +26,8 @@ Url: http://live.gnome.org/GnomeShell
Source: http://download.gnome.org/sources/gnome-shell/3.20/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gnome-shell-private-connection.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- create private connections if the user is not authorized
Patch1: gnome-shell-private-connection.patch
# PATCH-FIX-UPSTREAM gnome-shell-Fix-offscreen-leak.patch bgo#735705 zaitor@opensuse.org -- Fix offscreen leak if cogl_framebuffer_allocate fails
Patch2: gnome-shell-Fix-offscreen-leak.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gcc-c++
BuildRequires: intltool
@ -146,6 +148,7 @@ into GNOME Shell calendar.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
translation-update-upstream
%build