add patch for drawing images

epel9
Timotheus Pokorra 4 years ago
parent 265cc8bc3d
commit 5f1dedc6c4

@ -0,0 +1,24 @@
From c98de971e5f453f50f898494b7791feb02302f62 Mon Sep 17 00:00:00 2001
From: Filip Navara <filip.navara@gmail.com>
Date: Thu, 3 Oct 2019 13:33:50 +0200
Subject: [PATCH] Add bitmap flushing to gdip_bitmap_clone to fix possible
inconsistencies for drawing flipped images (#604)
There were few usages of `gdip_bitmap_clone` with missing flush calls. Unfortunately there is zero code coverage for these paths. The chances of actually turning this into visible bug are thin. One would have to create an ARGB32 bitmap, draw into it and then try to paint it flipped into another bitmap. Adding the flush call down the stack is a safety precaution that should prevent any incorrect usage.
---
src/bitmap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/bitmap.c b/src/bitmap.c
index 12485428..d52b15a8 100644
--- a/src/bitmap.c
+++ b/src/bitmap.c
@@ -639,6 +639,8 @@ gdip_bitmap_clone (GpBitmap *bitmap, GpBitmap **clonedbitmap)
return OutOfMemory;
}
+ gdip_bitmap_flush_surface (bitmap);
+
/* Copy simple types */
result->type = bitmap->type;
result->image_format = bitmap->image_format;

@ -3,11 +3,12 @@
Name: libgdiplus
Version: 6.0.4
Release: 3%{?dist}
Release: 4%{?dist}
Summary: An Open Source implementation of the GDI+ API
License: MIT
URL: http://www.mono-project.com/Main_Page
Source0: http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.gz
Patch1: libgdiplus-6.0.4-bitmap_flush.patch
BuildRequires: gcc
BuildRequires: freetype-devel glib2-devel libjpeg-devel libtiff-devel
BuildRequires: libpng-devel fontconfig-devel
@ -27,6 +28,7 @@ Development files for libgdiplus
%prep
%setup -q
%patch1 -p1
CFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy"
CXXFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy"
@ -55,6 +57,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%{_libdir}/lib*.so
%changelog
* Tue Aug 04 2020 Timotheus Pokorra <timotheus.pokorra@solidcharity.com> - 6.0.4-4
- add patch for drawing images
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

Loading…
Cancel
Save