[gimp] app: split legacy out of soft and hard light



commit 8f3842434c06cbb4c6293c0aae29baa54af97e9d
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Jan 11 04:10:06 2017 +0100

    app: split legacy out of soft and hard light

 app/core/core-enums.h                         |    6 ++++--
 app/gegl/gimp-gegl-nodes.c                    |   12 ++++++++++--
 app/operations/Makefile.am                    |    4 ----
 app/operations/gimp-operations.c              |   12 ++++++++----
 app/operations/gimplayermodefunctions.c       |   18 ++++++++++++++----
 app/operations/layer-modes-legacy/Makefile.am |    7 ++++++-
 app/operations/layer-modes/Makefile.am        |    6 +++++-
 app/widgets/gimpwidgets-constructors.c        |    4 +++-
 8 files changed, 50 insertions(+), 19 deletions(-)
---
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 6f0c656..66be49a 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -172,8 +172,8 @@ typedef enum
   GIMP_LAYER_MODE_DIVIDE_LEGACY,          /*< desc="Divide (legacy)"      >*/
   GIMP_LAYER_MODE_DODGE_LEGACY,           /*< desc="Dodge (legacy)"       >*/
   GIMP_LAYER_MODE_BURN_LEGACY,            /*< desc="Burn (legacy)"        >*/
-  GIMP_LAYER_MODE_HARDLIGHT_LEGACY,       /*< desc="Hard light"           >*/
-  GIMP_LAYER_MODE_SOFTLIGHT_LEGACY,       /*< desc="Soft light"           >*/
+  GIMP_LAYER_MODE_HARDLIGHT_LEGACY,       /*< desc="Hard light (legacy)"  >*/
+  GIMP_LAYER_MODE_SOFTLIGHT_LEGACY,       /*< desc="Soft light (legacy)"  >*/
   GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY,   /*< desc="Grain extract"        >*/
   GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY,     /*< desc="Grain merge"          >*/
   GIMP_LAYER_MODE_COLOR_ERASE,            /*< desc="Color erase"          >*/
@@ -198,6 +198,8 @@ typedef enum
   GIMP_LAYER_MODE_HSV_VALUE,              /*< desc="Value (HSV)"          >*/
   GIMP_LAYER_MODE_DIVIDE,                 /*< desc="Divide"               >*/
   GIMP_LAYER_MODE_BURN,                   /*< desc="Burn"                 >*/
+  GIMP_LAYER_MODE_HARDLIGHT,              /*< desc="Hard light"           >*/
+  GIMP_LAYER_MODE_SOFTLIGHT,              /*< desc="Soft light"           >*/
 
   /* internal modes, not available to the PDB */
   GIMP_LAYER_MODE_ERASE      = 1000, /*< pdb-skip, desc="Erase"      >*/
diff --git a/app/gegl/gimp-gegl-nodes.c b/app/gegl/gimp-gegl-nodes.c
index 8e812d0..af7c049 100644
--- a/app/gegl/gimp-gegl-nodes.c
+++ b/app/gegl/gimp-gegl-nodes.c
@@ -279,12 +279,20 @@ gimp_gegl_mode_node_set_mode (GeglNode      *node,
       operation = "gimp:burn-legacy";
       break;
 
+    case GIMP_LAYER_MODE_HARDLIGHT:
+      operation = "gimp:hardlight";
+      break;
+
     case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
-      operation = "gimp:hardlight-mode";
+      operation = "gimp:hardlight-legacy";
+      break;
+
+    case GIMP_LAYER_MODE_SOFTLIGHT:
+      operation = "gimp:softlight";
       break;
 
     case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
-      operation = "gimp:softlight-mode";
+      operation = "gimp:softlight-legacy";
       break;
 
     case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index 91b5714..1c2b21e 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -99,10 +99,6 @@ libappoperations_a_SOURCES = \
        gimpoperationpointlayermode.h           \
        gimpoperationbehindmode.c               \
        gimpoperationbehindmode.h               \
-       gimpoperationhardlightmode.c            \
-       gimpoperationhardlightmode.h            \
-       gimpoperationsoftlightmode.c            \
-       gimpoperationsoftlightmode.h            \
        gimpoperationgrainextractmode.c         \
        gimpoperationgrainextractmode.h         \
        gimpoperationgrainmergemode.c           \
diff --git a/app/operations/gimp-operations.c b/app/operations/gimp-operations.c
index ac68c7a..77ea621 100644
--- a/app/operations/gimp-operations.c
+++ b/app/operations/gimp-operations.c
@@ -98,8 +98,10 @@
 #include "layer-modes-legacy/gimpoperationdodgelegacy.h"
 #include "layer-modes/gimpoperationburn.h"
 #include "layer-modes-legacy/gimpoperationburnlegacy.h"
-#include "gimpoperationhardlightmode.h"
-#include "gimpoperationsoftlightmode.h"
+#include "layer-modes/gimpoperationhardlight.h"
+#include "layer-modes-legacy/gimpoperationhardlightlegacy.h"
+#include "layer-modes/gimpoperationsoftlight.h"
+#include "layer-modes-legacy/gimpoperationsoftlightlegacy.h"
 #include "gimpoperationgrainextractmode.h"
 #include "gimpoperationgrainmergemode.h"
 #include "gimpoperationcolorerasemode.h"
@@ -176,8 +178,10 @@ gimp_operations_init (void)
   g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_LEGACY);
   g_type_class_ref (GIMP_TYPE_OPERATION_BURN);
   g_type_class_ref (GIMP_TYPE_OPERATION_BURN_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_MODE);
-  g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_MODE);
+  g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT);
+  g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_LEGACY);
+  g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT);
+  g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_LEGACY);
   g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE);
   g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE);
   g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE_MODE);
diff --git a/app/operations/gimplayermodefunctions.c b/app/operations/gimplayermodefunctions.c
index 22ddf5d..5642b1a 100644
--- a/app/operations/gimplayermodefunctions.c
+++ b/app/operations/gimplayermodefunctions.c
@@ -58,8 +58,10 @@
 #include "layer-modes-legacy/gimpoperationdodgelegacy.h"
 #include "layer-modes/gimpoperationburn.h"
 #include "layer-modes-legacy/gimpoperationburnlegacy.h"
-#include "gimpoperationhardlightmode.h"
-#include "gimpoperationsoftlightmode.h"
+#include "layer-modes/gimpoperationhardlight.h"
+#include "layer-modes-legacy/gimpoperationhardlightlegacy.h"
+#include "layer-modes/gimpoperationsoftlight.h"
+#include "layer-modes-legacy/gimpoperationsoftlightlegacy.h"
 #include "gimpoperationgrainextractmode.h"
 #include "gimpoperationgrainmergemode.h"
 #include "gimpoperationcolorerasemode.h"
@@ -208,12 +210,20 @@ get_layer_mode_function (GimpLayerMode  paint_mode,
       func = gimp_operation_burn_process_pixels;
       break;
 
+    case GIMP_LAYER_MODE_HARDLIGHT:
+      func = gimp_operation_hardlight_process_pixels;
+      break;
+
     case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
-      func = gimp_operation_hardlight_mode_process_pixels;
+      func = gimp_operation_hardlight_legacy_process_pixels;
+      break;
+
+    case GIMP_LAYER_MODE_SOFTLIGHT:
+      func = gimp_operation_softlight_process_pixels;
       break;
 
     case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
-      func = gimp_operation_softlight_mode_process_pixels;
+      func = gimp_operation_softlight_legacy_process_pixels;
       break;
 
     case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
diff --git a/app/operations/layer-modes-legacy/Makefile.am b/app/operations/layer-modes-legacy/Makefile.am
index 7b530ff..88c6424 100644
--- a/app/operations/layer-modes-legacy/Makefile.am
+++ b/app/operations/layer-modes-legacy/Makefile.am
@@ -42,4 +42,9 @@ libapplayermodeslegacy_a_SOURCES = \
        gimpoperationdividelegacy.c     \
        gimpoperationdividelegacy.h     \
        gimpoperationburnlegacy.c       \
-       gimpoperationburnlegacy.h 
+       gimpoperationburnlegacy.h       \
+       gimpoperationhardlightlegacy.c  \
+       gimpoperationhardlightlegacy.h  \
+       gimpoperationsoftlightlegacy.c  \
+       gimpoperationsoftlightlegacy.h
+
diff --git a/app/operations/layer-modes/Makefile.am b/app/operations/layer-modes/Makefile.am
index 1710f13..84cee81 100644
--- a/app/operations/layer-modes/Makefile.am
+++ b/app/operations/layer-modes/Makefile.am
@@ -64,7 +64,11 @@ libapplayermodes_generic_a_sources = \
        gimpoperationdivide.c           \
        gimpoperationdivide.h           \
        gimpoperationburn.c             \
-       gimpoperationburn.h 
+       gimpoperationburn.h             \
+       gimpoperationhardlight.c        \
+       gimpoperationhardlight.h        \
+       gimpoperationsoftlight.c        \
+       gimpoperationsoftlight.h
 
 libapplayermodes_sse2_a_sources = \
        gimpoperationnormal-sse2.c
diff --git a/app/widgets/gimpwidgets-constructors.c b/app/widgets/gimpwidgets-constructors.c
index 1588656..9b65231 100644
--- a/app/widgets/gimpwidgets-constructors.c
+++ b/app/widgets/gimpwidgets-constructors.c
@@ -104,7 +104,7 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
   GtkWidget    *combo;
 
   store = gimp_enum_store_new_with_values (GIMP_TYPE_LAYER_MODE,
-                                           41,
+                                           43,
                                            GIMP_LAYER_MODE_NORMAL,
                                            GIMP_LAYER_MODE_NORMAL_NON_LINEAR,
                                            GIMP_LAYER_MODE_DISSOLVE,
@@ -124,7 +124,9 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
                                            GIMP_LAYER_MODE_BURN,
                                            GIMP_LAYER_MODE_BURN_LEGACY,
                                            GIMP_LAYER_MODE_OVERLAY,
+                                           GIMP_LAYER_MODE_SOFTLIGHT,
                                            GIMP_LAYER_MODE_SOFTLIGHT_LEGACY,
+                                           GIMP_LAYER_MODE_HARDLIGHT,
                                            GIMP_LAYER_MODE_HARDLIGHT_LEGACY,
                                            GIMP_LAYER_MODE_DIFFERENCE,
                                            GIMP_LAYER_MODE_DIFFERENCE_LEGACY,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]