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