SHA256
1
0
forked from pool/freerdp

Accepting request 112000 from home:ZaWertun:branches:X11:RemoteDesktop

Added patch to resolve issue #348 - Bitmap cache drawing problem?
  (https://github.com/FreeRDP/FreeRDP/issues/348)

OBS-URL: https://build.opensuse.org/request/show/112000
OBS-URL: https://build.opensuse.org/package/show/X11:RemoteDesktop/freerdp?expand=0&rev=16
This commit is contained in:
Guido Berhoerster 2012-03-30 22:15:18 +00:00 committed by Git OBS Bridge
parent fd6ba1fc65
commit 436060a58e
3 changed files with 59 additions and 0 deletions

51
fix_bitmap_cache.patch Normal file
View File

@ -0,0 +1,51 @@
diff --git a/libfreerdp-cache/bitmap.c b/libfreerdp-cache/bitmap.c
index 99c1005..e3e2303 100644
--- a/libfreerdp-cache/bitmap.c
+++ b/libfreerdp-cache/bitmap.c
@@ -173,9 +173,10 @@ rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, uint32 id, uint32 inde
}
if (index == BITMAP_CACHE_WAITING_LIST_INDEX)
- index = bitmap_cache->cells[id].number - 1;
-
- if (index > bitmap_cache->cells[id].number)
+ {
+ index = bitmap_cache->cells[id].number;
+ }
+ else if (index > bitmap_cache->cells[id].number)
{
printf("get invalid bitmap index %d in cell id: %d\n", index, id);
return NULL;
@@ -195,9 +196,10 @@ void bitmap_cache_put(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index, rdp
}
if (index == BITMAP_CACHE_WAITING_LIST_INDEX)
- index = bitmap_cache->cells[id].number - 1;
-
- if (index > bitmap_cache->cells[id].number)
+ {
+ index = bitmap_cache->cells[id].number;
+ }
+ else if (index > bitmap_cache->cells[id].number)
{
printf("put invalid bitmap index %d in cell id: %d\n", index, id);
return;
@@ -255,7 +257,8 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{
bitmap_cache->cells[i].number = settings->bitmapCacheV2CellInfo[i].numEntries;
- bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number);
+ /* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */
+ bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number + 1);
}
}
@@ -271,7 +274,7 @@ void bitmap_cache_free(rdpBitmapCache* bitmap_cache)
{
for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{
- for (j = 0; j < (int) bitmap_cache->cells[i].number; j++)
+ for (j = 0; j < (int) bitmap_cache->cells[i].number + 1; j++)
{
bitmap = bitmap_cache->cells[i].entries[j];

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 30 12:23:29 UTC 2012 - zawertun@gmail.com
- Added patch to resolve issue #348 - Bitmap cache drawing problem?
(https://github.com/FreeRDP/FreeRDP/issues/348)
-------------------------------------------------------------------
Wed Mar 28 09:37:04 UTC 2012 - gber@opensuse.org

View File

@ -26,6 +26,7 @@ License: Apache-2.0
Group: Productivity/Networking/Other
Url: http://www.freerdp.com/
Source0: https://github.com/downloads/FreeRDP/FreeRDP/%{name}-%{version}.tar.gz
Patch0: fix_bitmap_cache.patch
BuildRequires: cmake
BuildRequires: cups-devel
BuildRequires: ed
@ -73,6 +74,7 @@ based on libfreerdp.
%prep
%setup -q
%patch0 -p1
# use a versioned subdirectory for plugins in order to comply with the shared
# library policy
ed -s CMakeLists.txt 2>/dev/null <<'EOF'