summaryrefslogtreecommitdiff
path: root/extra/gegl/gegl-0.2.0-remove-src-over-op.patch
blob: a823580fd247692e2e389a2fc08f33dffc91d1f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
From 72168aba34445e4cd99aaed32d8e6a80e89ce729 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Mon, 1 Jul 2013 13:53:18 +0200
Subject: [PATCH] patch: remove-src-over-op

Squashed commit of the following:

commit b766094d951bf1515a75408ee85d4e1af432e6bd
Author: Daniel Sabo <DanielSabo@gmail.com>
Date:   Tue Jun 4 20:57:03 2013 -0700

    Remove auto-generated svg:src-over

    It was already shadowed by gegl:over, which declares
    svg:src-over as a compat-name.

    (cherry picked from commit c1caf2401271e8a17fd1937bf84279c250bd8e2a)

    Conflicts:
    	po/POTFILES.in
---
 operations/generated/src-over.c            | 122 -----------------------------
 operations/generated/svg-12-porter-duff.rb |   5 +-
 po/POTFILES.in                             |   3 +-
 3 files changed, 4 insertions(+), 126 deletions(-)
 delete mode 100644 operations/generated/src-over.c

diff --git a/operations/generated/src-over.c b/operations/generated/src-over.c
deleted file mode 100644
index e586087..0000000
--- a/operations/generated/src-over.c
+++ /dev/null
@@ -1,122 +0,0 @@
-
-/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
- *
- * This file is an image processing operation for GEGL
- *
- * GEGL is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * GEGL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
- *
- *  Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
- *            2007 John Marshall
- *
- * SVG rendering modes; see:
- *     http://www.w3.org/TR/SVG12/rendering.html
- *     http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
- *
- *     aA = aux(src) alpha      aB = in(dst) alpha      aD = out alpha
- *     cA = aux(src) colour     cB = in(dst) colour     cD = out colour
- *
- * !!!! AUTOGENERATED FILE !!!!!
- */
-#include "config.h"
-#include <glib/gi18n-lib.h>
-
-
-#ifdef GEGL_CHANT_PROPERTIES
-
-/* no properties */
-
-#else
-
-#define GEGL_CHANT_TYPE_POINT_COMPOSER
-#define GEGL_CHANT_C_FILE        "src-over.c"
-
-#include "gegl-chant.h"
-
-static void prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("RaGaBaA float");
-
-  gegl_operation_set_format (operation, "input", format);
-  gegl_operation_set_format (operation, "aux", format);
-  gegl_operation_set_format (operation, "output", format);
-}
-
-static gboolean
-process (GeglOperation        *op,
-          void                *in_buf,
-          void                *aux_buf,
-          void                *out_buf,
-          glong                n_pixels,
-          const GeglRectangle *roi,
-          gint                 level)
-{
-  gint i;
-  gfloat * GEGL_ALIGNED in = in_buf;
-  gfloat * GEGL_ALIGNED aux = aux_buf;
-  gfloat * GEGL_ALIGNED out = out_buf;
-
-  if (aux==NULL)
-    return TRUE;
-
-  for (i = 0; i < n_pixels; i++)
-    {
-      gint   j;
-      gfloat aA G_GNUC_UNUSED, aB G_GNUC_UNUSED, aD G_GNUC_UNUSED;
-
-      aB = in[3];
-      aA = aux[3];
-      aD = aA + aB - aA * aB;
-
-      for (j = 0; j < 3; j++)
-        {
-          gfloat cA G_GNUC_UNUSED, cB G_GNUC_UNUSED;
-
-          cB = in[j];
-          cA = aux[j];
-          out[j] = cA + cB * (1.0f - aA);
-        }
-      out[3] = aD;
-      in  += 4;
-      aux += 4;
-      out += 4;
-    }
-  return TRUE;
-}
-
-
-static void
-gegl_chant_class_init (GeglChantClass *klass)
-{
-  GeglOperationClass              *operation_class;
-  GeglOperationPointComposerClass *point_composer_class;
-
-  operation_class      = GEGL_OPERATION_CLASS (klass);
-  point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
-
-  point_composer_class->process = process;
-  operation_class->prepare = prepare;
-
-
-  operation_class->compat_name = "gegl:src-over";
-  gegl_operation_class_set_keys (operation_class,
-    "name"      , "svg:src-over",
-    "categories", "compositors:porter-duff",
-    "description",
-        _("Porter Duff operation src-over (d = cA + cB * (1.0f - aA))"),
-        NULL);
- 
-
-}
-
-#endif
diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
index 5516802..dab5d2f 100755
--- a/operations/generated/svg-12-porter-duff.rb
+++ b/operations/generated/svg-12-porter-duff.rb
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 copyright = '
 /* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
@@ -38,8 +39,8 @@ a = [
                         'aA'],
       ['dst',           'cB',
                         'aB'],
-      ['src_over',      'cA + cB * (1.0f - aA)',
-                        'aA + aB - aA * aB'],
+#      ['src_over',      'cA + cB * (1.0f - aA)',
+#                        'aA + aB - aA * aB'],
       ['dst_over',      'cB + cA * (1.0f - aB)',
                         'aA + aB - aA * aB'],
       ['dst_in',        'cB * aA', # <- XXX: typo?
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e309594..d36cbc2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -115,10 +115,9 @@ operations/generated/plus.c
 operations/generated/screen.c
 operations/generated/soft-light.c
 operations/generated/src-atop.c
+operations/generated/src.c
 operations/generated/src-in.c
 operations/generated/src-out.c
-operations/generated/src-over.c
-operations/generated/src.c
 operations/generated/subtract.c
 operations/generated/svg-multiply.c
 operations/generated/xor.c
-- 
1.8.3.1