Fix palette cache regression. rhbz#1011936
This commit is contained in:
parent
3475a6aefe
commit
296722cd33
@ -1,7 +1,7 @@
|
||||
From 1c66070f5d59f27da876382aff55863ce7549db1 Mon Sep 17 00:00:00 2001
|
||||
From ab8b3dfbfa5874ab3977bc5d5d76276056da6911 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 29 Sep 2013 22:59:32 +0200
|
||||
Subject: [PATCH] spice-channel: Fix usbredir being broken since commit
|
||||
Subject: [PATCH 1/3] spice-channel: Fix usbredir being broken since commit
|
||||
159c6ebf
|
||||
|
||||
The usbredir channel uses spice_msg_in_raw to get its data, which uses
|
||||
|
45
0002-display-fix-palette-regression.patch
Normal file
45
0002-display-fix-palette-regression.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 4954d18ff54e5e59a3bbd6b90ebc5d9acbb5e571 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Thu, 3 Oct 2013 13:50:15 +0200
|
||||
Subject: [PATCH 2/3] display: fix palette regression
|
||||
|
||||
palette_get() used to return a ref, and palette_release() used to
|
||||
release that ref.
|
||||
|
||||
Since ed877341, the palette is no longer refcount'ed, since its usage is
|
||||
exclusively local in common/canvas code.
|
||||
|
||||
palette_release() shouldn't remove the palette from the cache.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1011936
|
||||
---
|
||||
gtk/channel-display.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
|
||||
index 794f4eb..e0f17eb 100644
|
||||
--- a/gtk/channel-display.c
|
||||
+++ b/gtk/channel-display.c
|
||||
@@ -546,8 +546,8 @@ static SpicePalette *palette_get(SpicePaletteCache *cache, uint64_t id)
|
||||
SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, palette_cache);
|
||||
|
||||
/* here the returned pointer is weak, no ref given to caller. it
|
||||
- * seems spice canvas usage is exclusively temporary, so it's ok
|
||||
- * (for now) */
|
||||
+ * seems spice canvas usage is exclusively temporary, so it's ok.
|
||||
+ * palette_release is a noop. */
|
||||
return cache_find(c->palettes, id);
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ static void palette_remove(SpicePaletteCache *cache, uint32_t id)
|
||||
|
||||
static void palette_release(SpicePaletteCache *cache, SpicePalette *palette)
|
||||
{
|
||||
- palette_remove(cache, palette->unique);
|
||||
+ /* there is no refcount of palette, see palette_get() */
|
||||
}
|
||||
|
||||
#ifdef SW_CANVAS_CACHE
|
||||
--
|
||||
1.8.3.1
|
||||
|
25
0003-display-cache-id-is-uint64_t.patch
Normal file
25
0003-display-cache-id-is-uint64_t.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 0ac275a86441a7b4de455b2e866318305ae549b4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Thu, 3 Oct 2013 13:53:36 +0200
|
||||
Subject: [PATCH 3/3] display: cache id is uint64_t
|
||||
|
||||
---
|
||||
gtk/channel-display.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
|
||||
index e0f17eb..a57453f 100644
|
||||
--- a/gtk/channel-display.c
|
||||
+++ b/gtk/channel-display.c
|
||||
@@ -551,7 +551,7 @@ static SpicePalette *palette_get(SpicePaletteCache *cache, uint64_t id)
|
||||
return cache_find(c->palettes, id);
|
||||
}
|
||||
|
||||
-static void palette_remove(SpicePaletteCache *cache, uint32_t id)
|
||||
+static void palette_remove(SpicePaletteCache *cache, uint64_t id)
|
||||
{
|
||||
SpiceDisplayChannelPrivate *c =
|
||||
SPICE_CONTAINEROF(cache, SpiceDisplayChannelPrivate, palette_cache);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
Name: spice-gtk
|
||||
Version: 0.21
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: A GTK+ widget for SPICE clients
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -22,6 +22,8 @@ URL: http://spice-space.org/page/Spice-Gtk
|
||||
#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk
|
||||
Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
|
||||
Patch1: 0001-spice-channel-Fix-usbredir-being-broken-since-commit.patch
|
||||
Patch2: 0002-display-fix-palette-regression.patch
|
||||
Patch3: 0003-display-cache-id-is-uint64_t.patch
|
||||
|
||||
BuildRequires: intltool
|
||||
BuildRequires: gtk2-devel >= 2.14
|
||||
@ -149,6 +151,8 @@ fi
|
||||
|
||||
pushd spice-gtk-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
find . -name '*.stamp' | xargs touch
|
||||
popd
|
||||
|
||||
@ -270,6 +274,9 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc
|
||||
%{_bindir}/spicy-stats
|
||||
|
||||
%changelog
|
||||
* Thu Oct 3 2013 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.21-3
|
||||
- Fix palette cache regression. rhbz#1011936
|
||||
|
||||
* Mon Sep 30 2013 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.21-2
|
||||
- Fix usbredir being broken in 0.21 release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user