Gentoo Archives: gentoo-commits

From: Alexandre Rostovtsev <tetromino@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/gdk-pixbuf/files/
Date: Tue, 01 Sep 2015 13:23:45
Message-Id: 1441113295.92308a3ae2aeed9279463f49f6fd118807a9be54.tetromino@gentoo
1 commit: 92308a3ae2aeed9279463f49f6fd118807a9be54
2 Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 1 13:14:55 2015 +0000
4 Commit: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 1 13:14:55 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92308a3a
7
8 x11-libs/gdk-pixbuf: remove unused patch
9
10 Package-Manager: portage-2.2.20.1
11
12 .../gdk-pixbuf-2.31.1-pixops-no-scaling.patch | 129 ---------------------
13 1 file changed, 129 deletions(-)
14
15 diff --git a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.1-pixops-no-scaling.patch b/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.1-pixops-no-scaling.patch
16 deleted file mode 100644
17 index a8587fc..0000000
18 --- a/x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.31.1-pixops-no-scaling.patch
19 +++ /dev/null
20 @@ -1,129 +0,0 @@
21 -From cc5fce6315dcc1127a3e2106223305ff763be815 Mon Sep 17 00:00:00 2001
22 -From: Hans Petter Jansson <hpj@××××××××.no>
23 -Date: Thu, 10 Nov 2005 19:13:00 +0000
24 -Subject: [PATCH] pixops: Special-case compositing/copying with no scaling
25 -
26 -When there is no scaling involved, make gdk_pixbuf_composite_color()
27 -faster by avoiding the scaling code path.
28 -
29 -https://bugzilla.gnome.org/show_bug.cgi?id=80927
30 ----
31 - gdk-pixbuf/pixops/pixops.c | 95 +++++++++++++++++++++++++++++++++++++++++++---
32 - 1 file changed, 90 insertions(+), 5 deletions(-)
33 -
34 -diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
35 -index 993223e..29a1c14 100644
36 ---- a/gdk-pixbuf/pixops/pixops.c
37 -+++ b/gdk-pixbuf/pixops/pixops.c
38 -@@ -421,6 +421,86 @@ pixops_composite_nearest (guchar *dest_buf,
39 - }
40 -
41 - static void
42 -+pixops_composite_nearest_noscale (guchar *dest_buf,
43 -+ int render_x0,
44 -+ int render_y0,
45 -+ int render_x1,
46 -+ int render_y1,
47 -+ int dest_rowstride,
48 -+ int dest_channels,
49 -+ gboolean dest_has_alpha,
50 -+ const guchar *src_buf,
51 -+ int src_width,
52 -+ int src_height,
53 -+ int src_rowstride,
54 -+ int src_channels,
55 -+ gboolean src_has_alpha,
56 -+ int overall_alpha)
57 -+{
58 -+ int i, j;
59 -+ int x;
60 -+
61 -+ for (i = 0; i < (render_y1 - render_y0); i++)
62 -+ {
63 -+ const guchar *src = src_buf + (i + render_y0) * src_rowstride;
64 -+ guchar *dest = dest_buf + i * dest_rowstride;
65 -+
66 -+ x = render_x0 * src_channels;
67 -+
68 -+ for (j=0; j < (render_x1 - render_x0); j++)
69 -+ {
70 -+ const guchar *p = src + x;
71 -+ unsigned int a0;
72 -+
73 -+ if (src_has_alpha)
74 -+ a0 = (p[3] * overall_alpha) / 0xff;
75 -+ else
76 -+ a0 = overall_alpha;
77 -+
78 -+ switch (a0)
79 -+ {
80 -+ case 0:
81 -+ break;
82 -+ case 255:
83 -+ dest[0] = p[0];
84 -+ dest[1] = p[1];
85 -+ dest[2] = p[2];
86 -+ if (dest_has_alpha)
87 -+ dest[3] = 0xff;
88 -+ break;
89 -+ default:
90 -+ if (dest_has_alpha)
91 -+ {
92 -+ unsigned int w0 = 0xff * a0;
93 -+ unsigned int w1 = (0xff - a0) * dest[3];
94 -+ unsigned int w = w0 + w1;
95 -+
96 -+ dest[0] = (w0 * p[0] + w1 * dest[0]) / w;
97 -+ dest[1] = (w0 * p[1] + w1 * dest[1]) / w;
98 -+ dest[2] = (w0 * p[2] + w1 * dest[2]) / w;
99 -+ dest[3] = w / 0xff;
100 -+ }
101 -+ else
102 -+ {
103 -+ unsigned int a1 = 0xff - a0;
104 -+ unsigned int tmp;
105 -+
106 -+ tmp = a0 * p[0] + a1 * dest[0] + 0x80;
107 -+ dest[0] = (tmp + (tmp >> 8)) >> 8;
108 -+ tmp = a0 * p[1] + a1 * dest[1] + 0x80;
109 -+ dest[1] = (tmp + (tmp >> 8)) >> 8;
110 -+ tmp = a0 * p[2] + a1 * dest[2] + 0x80;
111 -+ dest[2] = (tmp + (tmp >> 8)) >> 8;
112 -+ }
113 -+ break;
114 -+ }
115 -+ dest += dest_channels;
116 -+ x += src_channels;
117 -+ }
118 -+ }
119 -+}
120 -+
121 -+static void
122 - pixops_composite_color_nearest (guchar *dest_buf,
123 - int render_x0,
124 - int render_y0,
125 -@@ -1781,11 +1861,16 @@ _pixops_composite_real (guchar *dest_buf,
126 -
127 - if (interp_type == PIXOPS_INTERP_NEAREST)
128 - {
129 -- pixops_composite_nearest (dest_buf, render_x0, render_y0, render_x1,
130 -- render_y1, dest_rowstride, dest_channels,
131 -- dest_has_alpha, src_buf, src_width, src_height,
132 -- src_rowstride, src_channels, src_has_alpha,
133 -- scale_x, scale_y, overall_alpha);
134 -+ if (scale_x == 1.0 && scale_y == 1.0)
135 -+ pixops_composite_nearest_noscale (dest_buf, render_x0, render_y0, render_x1, render_y1,
136 -+ dest_rowstride, dest_channels, dest_has_alpha,
137 -+ src_buf, src_width, src_height, src_rowstride, src_channels,
138 -+ src_has_alpha, overall_alpha);
139 -+ else
140 -+ pixops_composite_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1,
141 -+ dest_rowstride, dest_channels, dest_has_alpha,
142 -+ src_buf, src_width, src_height, src_rowstride, src_channels,
143 -+ src_has_alpha, scale_x, scale_y, overall_alpha);
144 - return;
145 - }
146 -
147 ---
148 -2.5.1
149 -