Updating link to change in openSUSE:Factory/librsvg revision 32.0
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/librsvg?expand=0&rev=9ededf1b6ad5f60c2270af02e75a78a5
This commit is contained in:
parent
f932704944
commit
fabdcaf407
107
librsvg-gdk-pixbuf-render-gtk3.patch
Normal file
107
librsvg-gdk-pixbuf-render-gtk3.patch
Normal file
@ -0,0 +1,107 @@
|
||||
From 18bbb79af0c798db6099dbe0dd6fff5b43f030be Mon Sep 17 00:00:00 2001
|
||||
From: Jasper St. Pierre <jstpierre@mecheye.net>
|
||||
Date: Thu, 12 Aug 2010 04:44:36 -0400
|
||||
Subject: [PATCH] Apply Company's changes on the internal librsvg pixbuf engine to remove the gdk calls and move over to cairo.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=626605
|
||||
---
|
||||
gtk-engine/svg-render.c | 70 +++++++++++++++++++++--------------------------
|
||||
1 files changed, 31 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/gtk-engine/svg-render.c b/gtk-engine/svg-render.c
|
||||
index ebe2f22..15440cc 100644
|
||||
--- a/gtk-engine/svg-render.c
|
||||
+++ b/gtk-engine/svg-render.c
|
||||
@@ -418,21 +418,30 @@ pixbuf_render (GdkPixbuf *src,
|
||||
y_offset = 0;
|
||||
}
|
||||
|
||||
+ cairo_t *cr;
|
||||
+
|
||||
if (mask)
|
||||
{
|
||||
- gdk_pixbuf_render_threshold_alpha (tmp_pixbuf, mask,
|
||||
- x_offset, y_offset,
|
||||
- rect.x, rect.y,
|
||||
- rect.width, rect.height,
|
||||
- 128);
|
||||
+ cr = gdk_cairo_create (mask);
|
||||
+
|
||||
+ gdk_cairo_set_source_pixbuf (cr, tmp_pixbuf,
|
||||
+ -x_offset + rect.x,
|
||||
+ -y_offset + rect.y);
|
||||
+ gdk_cairo_rectangle (cr, &rect);
|
||||
+ cairo_fill (cr);
|
||||
+
|
||||
+ cairo_destroy (cr);
|
||||
}
|
||||
|
||||
- gdk_draw_pixbuf (window, NULL, tmp_pixbuf,
|
||||
- x_offset, y_offset,
|
||||
- rect.x, rect.y,
|
||||
- rect.width, rect.height,
|
||||
- GDK_RGB_DITHER_NORMAL,
|
||||
- 0, 0);
|
||||
+ cr = gdk_cairo_create (window);
|
||||
+ gdk_cairo_set_source_pixbuf (cr,
|
||||
+ tmp_pixbuf,
|
||||
+ -x_offset + rect.x,
|
||||
+ -y_offset + rect.y);
|
||||
+ gdk_cairo_rectangle (cr, &rect);
|
||||
+ cairo_fill (cr);
|
||||
+
|
||||
+ cairo_destroy (cr);
|
||||
g_object_unref (tmp_pixbuf);
|
||||
}
|
||||
|
||||
@@ -827,37 +836,20 @@ theme_pixbuf_render (ThemePixbuf *theme_pb,
|
||||
}
|
||||
else
|
||||
{
|
||||
- GdkPixmap *tmp_pixmap;
|
||||
- GdkGC *tmp_gc;
|
||||
- GdkGCValues gc_values;
|
||||
-
|
||||
- tmp_pixmap = gdk_pixmap_new (window,
|
||||
- pixbuf_width,
|
||||
- pixbuf_height,
|
||||
- -1);
|
||||
- tmp_gc = gdk_gc_new (tmp_pixmap);
|
||||
- gdk_draw_pixbuf (tmp_pixmap, tmp_gc, pixbuf,
|
||||
- 0, 0,
|
||||
- 0, 0,
|
||||
- pixbuf_width, pixbuf_height,
|
||||
- GDK_RGB_DITHER_NORMAL,
|
||||
- 0, 0);
|
||||
- g_object_unref (tmp_gc);
|
||||
-
|
||||
- gc_values.fill = GDK_TILED;
|
||||
- gc_values.tile = tmp_pixmap;
|
||||
- tmp_gc = gdk_gc_new_with_values (window,
|
||||
- &gc_values, GDK_GC_FILL | GDK_GC_TILE);
|
||||
+ cairo_t *cr = gdk_cairo_create (window);
|
||||
+
|
||||
+ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
|
||||
+ cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
|
||||
+
|
||||
if (clip_rect)
|
||||
- gdk_draw_rectangle (window, tmp_gc, TRUE,
|
||||
- clip_rect->x, clip_rect->y, clip_rect->width, clip_rect->height);
|
||||
+ gdk_cairo_rectangle (cr, clip_rect);
|
||||
else
|
||||
- gdk_draw_rectangle (window, tmp_gc, TRUE, x, y, width, height);
|
||||
+ cairo_rectangle (cr, x, y, width, height);
|
||||
|
||||
- g_object_unref (tmp_gc);
|
||||
- g_object_unref (tmp_pixmap);
|
||||
- }
|
||||
- }
|
||||
+ cairo_fill (cr);
|
||||
|
||||
+ cairo_destroy (cr);
|
||||
+ }
|
||||
+ }
|
||||
g_object_unref(pixbuf);
|
||||
}
|
||||
--
|
||||
1.7.2.1
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 00:06:06 CEST 2010 - vuntz@opensuse.org
|
||||
|
||||
- Add librsvg-gdk-pixbuf-render-gtk3.patch to fix build with
|
||||
GTK+ 3: the pixbuf renderer was using API that got removed. The
|
||||
patch is correct, but suboptimal, so it's still sitting in
|
||||
bugzilla. However, since we're not using this GTK+ engine by
|
||||
default, it's okay to use it.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 23 09:26:51 CEST 2010 - vuntz@opensuse.org
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
Name: librsvg
|
||||
Version: 2.31.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPLv2+
|
||||
Summary: A Library for Rendering SVG Data
|
||||
Url: http://librsvg.sourceforge.net/
|
||||
@ -30,6 +30,8 @@ Source99: baselibs.conf
|
||||
# PATCH-FIX-OPENSUSE librsvg-gdk-pixbuf-query-loaders-64.patch vuntz@opensuse.org -- Fix check for gdk-pixbuf-query-loaders on 64bit systems
|
||||
Patch0: librsvg-gdk-pixbuf-query-loaders-64.patch
|
||||
Patch1: env-paths.diff
|
||||
# PATCH-FIX-UPSTREAM librsvg-gdk-pixbuf-render-gtk3.patch bgo#626605 vuntz@opensuse.org -- Fix build with recent gtk+ 3. The patch is technically correct, but suboptimal; see comments in bugzilla. Still, okay for us as we don't use this engine by default.
|
||||
Patch2: librsvg-gdk-pixbuf-render-gtk3.patch
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
@ -133,6 +135,7 @@ http://www.w3c.org).
|
||||
touch aclocal.m4
|
||||
%endif
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure\
|
||||
|
Loading…
Reference in New Issue
Block a user