[gimp] app: layer op fission cleanup
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: layer op fission cleanup
- Date: Mon, 9 Jan 2017 23:01:21 +0000 (UTC)
commit 92047ea949d97da46c7b20b93e99a00f193b0396
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 9 23:56:45 2017 +0100
app: layer op fission cleanup
app/operations/gimp-operations.c | 9 ++++++---
app/operations/gimplayermodefunctions.c | 9 +++++++--
app/operations/layer-modes/gimpoperationscreen.h | 12 ++++++------
tools/pdbgen/enums.pl | 6 ++++--
4 files changed, 23 insertions(+), 13 deletions(-)
---
diff --git a/app/operations/gimp-operations.c b/app/operations/gimp-operations.c
index 766a61d..44a2806 100644
--- a/app/operations/gimp-operations.c
+++ b/app/operations/gimp-operations.c
@@ -74,7 +74,8 @@
#include "layer-modes/gimpoperationscreen.h"
#include "layer-modes-legacy/gimpoperationscreenlegacy.h"
#include "layer-modes/gimpoperationoverlay.h"
-#include "gimpoperationdifferencemode.h"
+#include "layer-modes/gimpoperationdifference.h"
+#include "layer-modes-legacy/gimpoperationdifferencelegacy.h"
#include "gimpoperationadditionmode.h"
#include "gimpoperationsubtractmode.h"
#include "gimpoperationdarkenonlymode.h"
@@ -138,9 +139,11 @@ gimp_operations_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_LEGACY);
- g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN);
+ g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_OVERLAY);
- g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE);
diff --git a/app/operations/gimplayermodefunctions.c b/app/operations/gimplayermodefunctions.c
index 90be814..19ebcaf 100644
--- a/app/operations/gimplayermodefunctions.c
+++ b/app/operations/gimplayermodefunctions.c
@@ -34,7 +34,8 @@
#include "layer-modes/gimpoperationscreen.h"
#include "layer-modes-legacy/gimpoperationscreenlegacy.h"
#include "layer-modes/gimpoperationoverlay.h"
-#include "gimpoperationdifferencemode.h"
+#include "layer-modes/gimpoperationdifference.h"
+#include "layer-modes-legacy/gimpoperationdifferencelegacy.h"
#include "gimpoperationadditionmode.h"
#include "gimpoperationsubtractmode.h"
#include "gimpoperationdarkenonlymode.h"
@@ -102,7 +103,11 @@ get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_DIFFERENCE_LEGACY:
- func = gimp_operation_difference_mode_process_pixels;
+ func = gimp_operation_difference_legacy_process_pixels;
+ break;
+
+ case GIMP_LAYER_MODE_DIFFERENCE:
+ func = gimp_operation_difference_process_pixels;
break;
case GIMP_LAYER_MODE_ADDITION_LEGACY:
diff --git a/app/operations/layer-modes/gimpoperationscreen.h
b/app/operations/layer-modes/gimpoperationscreen.h
index bf6c49a..0b02574 100644
--- a/app/operations/layer-modes/gimpoperationscreen.h
+++ b/app/operations/layer-modes/gimpoperationscreen.h
@@ -25,12 +25,12 @@
#include "../gimpoperationpointlayermode.h"
-#define GIMP_TYPE_OPERATION_SCREEN_MODE (gimp_operation_screen_get_type ())
-#define GIMP_OPERATION_SCREEN_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_SCREEN_MODE, GimpOperationScreen))
-#define GIMP_OPERATION_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_SCREEN_MODE, GimpOperationScreenClass))
-#define GIMP_IS_OPERATION_SCREEN_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_SCREEN_MODE))
-#define GIMP_IS_OPERATION_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_SCREEN_MODE))
-#define GIMP_OPERATION_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_SCREEN_MODE, GimpOperationScreenClass))
+#define GIMP_TYPE_OPERATION_SCREEN (gimp_operation_screen_get_type ())
+#define GIMP_OPERATION_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_SCREEN, GimpOperationScreen))
+#define GIMP_OPERATION_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_SCREEN, GimpOperationScreenClass))
+#define GIMP_IS_OPERATION_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_SCREEN))
+#define GIMP_IS_OPERATION_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_SCREEN))
+#define GIMP_OPERATION_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_SCREEN, GimpOperationScreenClass))
typedef struct _GimpOperationScreen GimpOperationScreen;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 5071cfe..6bac81b 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -723,7 +723,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_LIGHTNESS
GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_MULTIPLY
GIMP_LAYER_MODE_MULTIPLY_LINEAR
- GIMP_LAYER_MODE_DODGE GIMP_LAYER_MODE_SCREEN) ],
+ GIMP_LAYER_MODE_DODGE GIMP_LAYER_MODE_SCREEN
+ GIMP_LAYER_MODE_DIFFERENCE) ],
mapping => { GIMP_LAYER_MODE_NORMAL_NON_LINEAR => '0',
GIMP_LAYER_MODE_DISSOLVE => '1',
GIMP_LAYER_MODE_BEHIND => '2',
@@ -756,7 +757,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_MULTIPLY => '29',
GIMP_LAYER_MODE_MULTIPLY_LINEAR => '30',
GIMP_LAYER_MODE_DODGE => '31',
- GIMP_LAYER_MODE_SCREEN => '32' }
+ GIMP_LAYER_MODE_SCREEN => '32',
+ GIMP_LAYER_MODE_DIFFERENCE => '33' }
},
GimpBrushApplicationMode =>
{ contig => 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]