[gimp] app: start moving layer modes into their own build directories
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: start moving layer modes into their own build directories
- Date: Mon, 9 Jan 2017 20:58:41 +0000 (UTC)
commit fd070eeb25effe13941ff379ffdc9220f937ed15
Author: Michael Natterer <mitch gimp org>
Date: Mon Jan 9 21:57:15 2017 +0100
app: start moving layer modes into their own build directories
New directories:
operations/layer-modes/
operations/layer-modes-legacy/
app/Makefile.am | 72 +++++++++---------
app/config/Makefile.am | 60 ++++++++-------
app/operations/Makefile.am | 48 ++----------
app/operations/gimp-operations.c | 12 ++--
app/operations/gimplayermodefunctions.c | 18 ++--
app/operations/gimpoperationnormalmode.h | 81 --------------------
app/operations/layer-modes-legacy/.gitignore | 5 +
app/operations/layer-modes-legacy/Makefile.am | 21 +++++
.../gimpoperationdodgelegacy.c | 2 +-
.../gimpoperationdodgelegacy.h | 5 +-
.../gimpoperationmultiplylegacy.c | 2 +-
.../gimpoperationmultiplylegacy.h | 5 +-
app/operations/layer-modes/.gitignore | 8 ++
app/operations/layer-modes/Makefile.am | 55 +++++++++++++
.../{ => layer-modes}/gimpoperationdodge.c | 2 +-
.../{ => layer-modes}/gimpoperationdodge.h | 9 +-
.../{ => layer-modes}/gimpoperationmultiply.c | 2 +-
.../{ => layer-modes}/gimpoperationmultiply.h | 7 +-
.../gimpoperationnormal-sse2.c} | 29 ++++----
.../gimpoperationnormal-sse4.c} | 27 ++++---
.../gimpoperationnormal.c} | 58 +++++++-------
app/operations/layer-modes/gimpoperationnormal.h | 81 ++++++++++++++++++++
app/tests/Makefile.am | 2 +
configure.ac | 2 +
24 files changed, 341 insertions(+), 272 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 7f17b16..d5e3734 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -136,41 +136,43 @@ AM_LDFLAGS = \
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec
gimpconsoleldadd = \
- xcf/libappxcf.a \
- pdb/libappinternal-procs.a \
- pdb/libapppdb.a \
- plug-in/libappplug-in.a \
- vectors/libappvectors.a \
- core/libappcore.a \
- file/libappfile.a \
- text/libapptext.a \
- paint/libapppaint.a \
- operations/libappoperations.a \
- gegl/libappgegl.a \
- config/libappconfig.a \
- $(libgimpconfig) \
- $(libgimpmath) \
- $(libgimpthumb) \
- $(libgimpcolor) \
- $(libgimpmodule) \
- $(libgimpbase) \
- $(GDK_PIXBUF_LIBS) \
- $(FREETYPE_LIBS) \
- $(FONTCONFIG_LIBS) \
- $(PANGOCAIRO_LIBS) \
- $(HARFBUZZ_LIBS) \
- $(CAIRO_LIBS) \
- $(GIO_UNIX_LIBS) \
- $(GIO_WINDOWS_LIBS) \
- $(GEGL_LIBS) \
- $(GLIB_LIBS) \
- $(LCMS_LIBS) \
- $(GEXIV2_LIBS) \
- $(Z_LIBS) \
- $(JSON_C_LIBS) \
- $(LIBMYPAINT_LIBS) \
- $(INTLLIBS) \
- $(RT_LIBS) \
+ xcf/libappxcf.a \
+ pdb/libappinternal-procs.a \
+ pdb/libapppdb.a \
+ plug-in/libappplug-in.a \
+ vectors/libappvectors.a \
+ core/libappcore.a \
+ file/libappfile.a \
+ text/libapptext.a \
+ paint/libapppaint.a \
+ operations/libappoperations.a \
+ operations/layer-modes/libapplayermodes.a \
+ operations/layer-modes-legacy/libapplayermodeslegacy.a \
+ gegl/libappgegl.a \
+ config/libappconfig.a \
+ $(libgimpconfig) \
+ $(libgimpmath) \
+ $(libgimpthumb) \
+ $(libgimpcolor) \
+ $(libgimpmodule) \
+ $(libgimpbase) \
+ $(GDK_PIXBUF_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS) \
+ $(PANGOCAIRO_LIBS) \
+ $(HARFBUZZ_LIBS) \
+ $(CAIRO_LIBS) \
+ $(GIO_UNIX_LIBS) \
+ $(GIO_WINDOWS_LIBS) \
+ $(GEGL_LIBS) \
+ $(GLIB_LIBS) \
+ $(LCMS_LIBS) \
+ $(GEXIV2_LIBS) \
+ $(Z_LIBS) \
+ $(JSON_C_LIBS) \
+ $(LIBMYPAINT_LIBS) \
+ $(INTLLIBS) \
+ $(RT_LIBS) \
$(libm)
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
diff --git a/app/config/Makefile.am b/app/config/Makefile.am
index 800d92f..d4d1991 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -92,35 +92,37 @@ test_config_LDFLAGS = \
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec
test_config_LDADD = \
- ../xcf/libappxcf.a \
- ../pdb/libappinternal-procs.a \
- ../pdb/libapppdb.a \
- ../plug-in/libappplug-in.a \
- ../vectors/libappvectors.a \
- ../core/libappcore.a \
- ../file/libappfile.a \
- ../text/libapptext.a \
- ../paint/libapppaint.a \
- ../gegl/libappgegl.a \
- ../operations/libappoperations.a \
- libappconfig.a \
- ../gimp-debug.o \
- ../gimp-log.o \
- $(libgimpmodule) \
- $(libgimpcolor) \
- $(libgimpthumb) \
- $(libgimpmath) \
- $(libgimpconfig) \
- $(libgimpbase) \
- $(PANGOCAIRO_LIBS) \
- $(HARFBUZZ_LIBS) \
- $(GDK_PIXBUF_LIBS) \
- $(GEGL_LIBS) \
- $(GIO_LIBS) \
- $(GEXIV2_LIBS) \
- $(Z_LIBS) \
- $(JSON_C_LIBS) \
- $(LIBMYPAINT_LIBS) \
+ ../xcf/libappxcf.a \
+ ../pdb/libappinternal-procs.a \
+ ../pdb/libapppdb.a \
+ ../plug-in/libappplug-in.a \
+ ../vectors/libappvectors.a \
+ ../core/libappcore.a \
+ ../file/libappfile.a \
+ ../text/libapptext.a \
+ ../paint/libapppaint.a \
+ ../gegl/libappgegl.a \
+ ../operations/libappoperations.a \
+ ../operations/layer-modes/libapplayermodes.a \
+ ../operations/layer-modes-legacy/libapplayermodeslegacy.a \
+ libappconfig.a \
+ ../gimp-debug.o \
+ ../gimp-log.o \
+ $(libgimpmodule) \
+ $(libgimpcolor) \
+ $(libgimpthumb) \
+ $(libgimpmath) \
+ $(libgimpconfig) \
+ $(libgimpbase) \
+ $(PANGOCAIRO_LIBS) \
+ $(HARFBUZZ_LIBS) \
+ $(GDK_PIXBUF_LIBS) \
+ $(GEGL_LIBS) \
+ $(GIO_LIBS) \
+ $(GEXIV2_LIBS) \
+ $(Z_LIBS) \
+ $(JSON_C_LIBS) \
+ $(LIBMYPAINT_LIBS) \
$(libm)
CLEANFILES = $(EXTRA_PROGRAMS) foorc
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index cae0628..27878df 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -1,5 +1,9 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = tests
+
+SUBDIRS = \
+ layer-modes \
+ layer-modes-legacy \
+ tests
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Operations\" \
@@ -13,12 +17,9 @@ AM_CPPFLAGS = \
-I$(includedir)
noinst_LIBRARIES = \
- libappoperations-generic.a \
- libappoperations-sse2.a \
- libappoperations-sse4.a \
libappoperations.a
-libappoperations_generic_a_sources = \
+libappoperations_a_SOURCES = \
operations-types.h \
gimp-operations.c \
gimp-operations.h \
@@ -96,16 +97,10 @@ libappoperations_generic_a_sources = \
\
gimpoperationpointlayermode.c \
gimpoperationpointlayermode.h \
- gimpoperationnormalmode.c \
- gimpoperationnormalmode.h \
gimpoperationdissolvemode.c \
gimpoperationdissolvemode.h \
gimpoperationbehindmode.c \
gimpoperationbehindmode.h \
- gimpoperationmultiply.c \
- gimpoperationmultiply.h \
- gimpoperationmultiplylegacy.c \
- gimpoperationmultiplylegacy.h \
gimpoperationscreenmode.c \
gimpoperationscreenmode.h \
gimpoperationoverlaymode.c \
@@ -130,10 +125,6 @@ libappoperations_generic_a_sources = \
gimpoperationvaluemode.h \
gimpoperationdividemode.c \
gimpoperationdividemode.h \
- gimpoperationdodge.c \
- gimpoperationdodge.h \
- gimpoperationdodgelegacy.c \
- gimpoperationdodgelegacy.h \
gimpoperationburnmode.c \
gimpoperationburnmode.h \
gimpoperationhardlightmode.c \
@@ -163,30 +154,3 @@ libappoperations_generic_a_sources = \
\
gimplayermodefunctions.c \
gimplayermodefunctions.h
-
-libappoperations_sse2_a_sources = \
- gimpoperationnormalmode-sse2.c
-
-libappoperations_sse4_a_sources = \
- gimpoperationnormalmode-sse4.c
-
-libappoperations_sse2_a_SOURCES = $(libappoperations_sse2_a_sources)
-
-libappoperations_sse2_a_CFLAGS = $(SSE2_EXTRA_CFLAGS)
-
-libappoperations_sse4_a_SOURCES = $(libappoperations_sse4_a_sources)
-
-libappoperations_sse4_a_CFLAGS = $(SSE4_1_EXTRA_CFLAGS)
-
-libappoperations_generic_a_SOURCES = $(libappoperations_generic_a_sources)
-
-libappoperations_a_SOURCES =
-
-libappoperations.a: libappoperations-generic.a \
- libappoperations-sse2.a \
- libappoperations-sse4.a
- $(AR) $(ARFLAGS) libappoperations.a \
- $(libappoperations_generic_a_OBJECTS) \
- $(libappoperations_sse2_a_OBJECTS) \
- $(libappoperations_sse4_a_OBJECTS)
- $(RANLIB) libappoperations.a
diff --git a/app/operations/gimp-operations.c b/app/operations/gimp-operations.c
index e286524..abbf7e1 100644
--- a/app/operations/gimp-operations.c
+++ b/app/operations/gimp-operations.c
@@ -66,11 +66,11 @@
#include "gimplevelsconfig.h"
#include "gimpoperationpointlayermode.h"
-#include "gimpoperationnormalmode.h"
+#include "layer-modes/gimpoperationnormal.h"
#include "gimpoperationdissolvemode.h"
#include "gimpoperationbehindmode.h"
-#include "gimpoperationmultiply.h"
-#include "gimpoperationmultiplylegacy.h"
+#include "layer-modes/gimpoperationmultiply.h"
+#include "layer-modes-legacy/gimpoperationmultiplylegacy.h"
#include "gimpoperationscreenmode.h"
#include "gimpoperationoverlaymode.h"
#include "gimpoperationdifferencemode.h"
@@ -83,8 +83,8 @@
#include "gimpoperationcolormode.h"
#include "gimpoperationvaluemode.h"
#include "gimpoperationdividemode.h"
-#include "gimpoperationdodge.h"
-#include "gimpoperationdodgelegacy.h"
+#include "layer-modes/gimpoperationdodge.h"
+#include "layer-modes-legacy/gimpoperationdodgelegacy.h"
#include "gimpoperationburnmode.h"
#include "gimpoperationhardlightmode.h"
#include "gimpoperationsoftlightmode.h"
@@ -132,7 +132,7 @@ gimp_operations_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_THRESHOLD);
g_type_class_ref (GIMP_TYPE_OPERATION_POINT_LAYER_MODE);
- g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL);
g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
diff --git a/app/operations/gimplayermodefunctions.c b/app/operations/gimplayermodefunctions.c
index 638453d..186cd9a 100644
--- a/app/operations/gimplayermodefunctions.c
+++ b/app/operations/gimplayermodefunctions.c
@@ -25,12 +25,12 @@
#include "operations-types.h"
#include "gimplayermodefunctions.h"
-#include "gimpoperationpointlayermode.h"
-#include "gimpoperationnormalmode.h"
+
+#include "layer-modes/gimpoperationnormal.h"
#include "gimpoperationdissolvemode.h"
#include "gimpoperationbehindmode.h"
-#include "gimpoperationmultiply.h"
-#include "gimpoperationmultiplylegacy.h"
+#include "layer-modes/gimpoperationmultiply.h"
+#include "layer-modes-legacy/gimpoperationmultiplylegacy.h"
#include "gimpoperationscreenmode.h"
#include "gimpoperationoverlaymode.h"
#include "gimpoperationdifferencemode.h"
@@ -43,8 +43,8 @@
#include "gimpoperationcolormode.h"
#include "gimpoperationvaluemode.h"
#include "gimpoperationdividemode.h"
-#include "gimpoperationdodge.h"
-#include "gimpoperationdodgelegacy.h"
+#include "layer-modes/gimpoperationdodge.h"
+#include "layer-modes-legacy/gimpoperationdodgelegacy.h"
#include "gimpoperationburnmode.h"
#include "gimpoperationhardlightmode.h"
#include "gimpoperationsoftlightmode.h"
@@ -64,12 +64,12 @@ GimpLayerModeFunction
get_layer_mode_function (GimpLayerMode paint_mode,
gboolean linear_mode)
{
- GimpLayerModeFunction func = gimp_operation_normal_mode_process_pixels;
+ GimpLayerModeFunction func = gimp_operation_normal_process_pixels;
switch (paint_mode)
{
case GIMP_LAYER_MODE_NORMAL:
- func = gimp_operation_normal_mode_process_pixels;
+ func = gimp_operation_normal_process_pixels;
break;
case GIMP_LAYER_MODE_DISSOLVE:
@@ -210,7 +210,7 @@ get_layer_mode_function (GimpLayerMode paint_mode,
default:
g_warning ("No direct function for layer mode (%d), using gimp:normal-mode", paint_mode);
- func = gimp_operation_normal_mode_process_pixels;
+ func = gimp_operation_normal_process_pixels;
break;
}
diff --git a/app/operations/layer-modes-legacy/.gitignore b/app/operations/layer-modes-legacy/.gitignore
new file mode 100644
index 0000000..3d0eec3
--- /dev/null
+++ b/app/operations/layer-modes-legacy/.gitignore
@@ -0,0 +1,5 @@
+/Makefile
+/Makefile.in
+/.deps
+/.libs
+/libapplayermodeslegacy.a
diff --git a/app/operations/layer-modes-legacy/Makefile.am b/app/operations/layer-modes-legacy/Makefile.am
new file mode 100644
index 0000000..dd16e34
--- /dev/null
+++ b/app/operations/layer-modes-legacy/Makefile.am
@@ -0,0 +1,21 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"Gimp-Layer-Modes-Legacy\" \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(top_builddir)/app \
+ -I$(top_srcdir)/app \
+ $(CAIRO_CFLAGS) \
+ $(GEGL_CFLAGS) \
+ $(GDK_PIXBUF_CFLAGS) \
+ -I$(includedir)
+
+noinst_LIBRARIES = \
+ libapplayermodeslegacy.a
+
+libapplayermodeslegacy_a_SOURCES = \
+ gimpoperationmultiplylegacy.c \
+ gimpoperationmultiplylegacy.h \
+ gimpoperationdodgelegacy.c \
+ gimpoperationdodgelegacy.h
diff --git a/app/operations/gimpoperationdodgelegacy.c
b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
similarity index 99%
rename from app/operations/gimpoperationdodgelegacy.c
rename to app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
index 2765d9a..966aabf 100644
--- a/app/operations/gimpoperationdodgelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
@@ -23,7 +23,7 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "operations/operations-types.h"
#include "gimpoperationdodgelegacy.h"
diff --git a/app/operations/gimpoperationdodgelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
similarity index 95%
rename from app/operations/gimpoperationdodgelegacy.h
rename to app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
index b47b853..0375cc6 100644
--- a/app/operations/gimpoperationdodgelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
@@ -22,7 +22,7 @@
#define __GIMP_OPERATION_DODGE_LEGACY_H__
-#include "gimpoperationpointlayermode.h"
+#include "operations/gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_DODGE_LEGACY (gimp_operation_dodge_legacy_get_type ())
@@ -47,7 +47,7 @@ struct _GimpOperationDodgeLegacyClass
};
-GType gimp_operation_dodge_legacy_get_type (void) G_GNUC_CONST;
+GType gimp_operation_dodge_legacy_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_dodge_legacy_process_pixels (gfloat *in,
gfloat *layer,
@@ -58,4 +58,5 @@ gboolean gimp_operation_dodge_legacy_process_pixels (gfloat *in,
const GeglRectangle *roi,
gint level);
+
#endif /* __GIMP_OPERATION_DODGE_LEGACY_H__ */
diff --git a/app/operations/gimpoperationmultiplylegacy.c
b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
similarity index 99%
rename from app/operations/gimpoperationmultiplylegacy.c
rename to app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
index 704d456..280c844 100644
--- a/app/operations/gimpoperationmultiplylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
@@ -23,7 +23,7 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "operations/operations-types.h"
#include "gimpoperationmultiplylegacy.h"
diff --git a/app/operations/gimpoperationmultiplylegacy.h
b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
similarity index 95%
rename from app/operations/gimpoperationmultiplylegacy.h
rename to app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
index f1fa2e5..cb27ed3 100644
--- a/app/operations/gimpoperationmultiplylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
@@ -22,7 +22,7 @@
#define __GIMP_OPERATION_MULTIPLY_LEGACY_H__
-#include "gimpoperationpointlayermode.h"
+#include "operations/gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_MULTIPLY_LEGACY (gimp_operation_multiply_legacy_get_type ())
@@ -47,7 +47,7 @@ struct _GimpOperationMultiplyLegacyClass
};
-GType gimp_operation_multiply_legacy_get_type (void) G_GNUC_CONST;
+GType gimp_operation_multiply_legacy_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_multiply_legacy_process_pixels (gfloat *in,
gfloat *layer,
@@ -58,4 +58,5 @@ gboolean gimp_operation_multiply_legacy_process_pixels (gfloat *in,
const GeglRectangle *roi,
gint level);
+
#endif /* __GIMP_OPERATION_MULTIPLY_LEGACY_H__ */
diff --git a/app/operations/layer-modes/.gitignore b/app/operations/layer-modes/.gitignore
new file mode 100644
index 0000000..a1a1a46
--- /dev/null
+++ b/app/operations/layer-modes/.gitignore
@@ -0,0 +1,8 @@
+/Makefile
+/Makefile.in
+/.deps
+/.libs
+/libapplayermodes.a
+/libapplayermodes-generic.a
+/libapplayermodes-sse2.a
+/libapplayermodes-sse4.a
diff --git a/app/operations/layer-modes/Makefile.am b/app/operations/layer-modes/Makefile.am
new file mode 100644
index 0000000..57c78d2
--- /dev/null
+++ b/app/operations/layer-modes/Makefile.am
@@ -0,0 +1,55 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"Gimp-Layer-Modes\" \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(top_builddir)/app \
+ -I$(top_srcdir)/app \
+ $(CAIRO_CFLAGS) \
+ $(GEGL_CFLAGS) \
+ $(GDK_PIXBUF_CFLAGS) \
+ -I$(includedir)
+
+noinst_LIBRARIES = \
+ libapplayermodes-generic.a \
+ libapplayermodes-sse2.a \
+ libapplayermodes-sse4.a \
+ libapplayermodes.a
+
+libapplayermodes_generic_a_sources = \
+ gimpoperationnormal.c \
+ gimpoperationnormal.h \
+ gimpoperationdodge.c \
+ gimpoperationdodge.h \
+ gimpoperationmultiply.c \
+ gimpoperationmultiply.h
+
+libapplayermodes_sse2_a_sources = \
+ gimpoperationnormal-sse2.c
+
+libapplayermodes_sse4_a_sources = \
+ gimpoperationnormal-sse4.c
+
+
+libapplayermodes_generic_a_SOURCES = $(libapplayermodes_generic_a_sources)
+
+libapplayermodes_sse2_a_SOURCES = $(libapplayermodes_sse2_a_sources)
+
+libapplayermodes_sse2_a_CFLAGS = $(SSE2_EXTRA_CFLAGS)
+
+libapplayermodes_sse4_a_SOURCES = $(libapplayermodes_sse4_a_sources)
+
+libapplayermodes_sse4_a_CFLAGS = $(SSE4_1_EXTRA_CFLAGS)
+
+libapplayermodes_a_SOURCES =
+
+
+libapplayermodes.a: libapplayermodes-generic.a \
+ libapplayermodes-sse2.a \
+ libapplayermodes-sse4.a
+ $(AR) $(ARFLAGS) libapplayermodes.a \
+ $(libapplayermodes_generic_a_OBJECTS) \
+ $(libapplayermodes_sse2_a_OBJECTS) \
+ $(libapplayermodes_sse4_a_OBJECTS)
+ $(RANLIB) libapplayermodes.a
diff --git a/app/operations/gimpoperationdodge.c b/app/operations/layer-modes/gimpoperationdodge.c
similarity index 99%
rename from app/operations/gimpoperationdodge.c
rename to app/operations/layer-modes/gimpoperationdodge.c
index 85e2f88..adf568e 100644
--- a/app/operations/gimpoperationdodge.c
+++ b/app/operations/layer-modes/gimpoperationdodge.c
@@ -24,7 +24,7 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "operations/operations-types.h"
#include "gimpoperationdodge.h"
diff --git a/app/operations/gimpoperationdodge.h b/app/operations/layer-modes/gimpoperationdodge.h
similarity index 90%
rename from app/operations/gimpoperationdodge.h
rename to app/operations/layer-modes/gimpoperationdodge.h
index a73ebdf..f59029d 100644
--- a/app/operations/gimpoperationdodge.h
+++ b/app/operations/layer-modes/gimpoperationdodge.h
@@ -23,7 +23,7 @@
#define __GIMP_OPERATION_DODGE_H__
-#include "gimpoperationpointlayermode.h"
+#include "operations/gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_DODGE (gimp_operation_dodge_get_type ())
@@ -48,7 +48,7 @@ struct _GimpOperationDodgeClass
};
-GType gimp_operation_dodge_get_type (void) G_GNUC_CONST;
+GType gimp_operation_dodge_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_dodge_process_pixels (gfloat *in,
gfloat *layer,
@@ -56,7 +56,8 @@ gboolean gimp_operation_dodge_process_pixels (gfloat *in,
gfloat *out,
gfloat opacity,
glong samples,
- const GeglRectangle *roi,
- gint level);
+ const GeglRectangle *roi,
+ gint level);
+
#endif /* __GIMP_OPERATION_DODGE_H__ */
diff --git a/app/operations/gimpoperationmultiply.c b/app/operations/layer-modes/gimpoperationmultiply.c
similarity index 99%
rename from app/operations/gimpoperationmultiply.c
rename to app/operations/layer-modes/gimpoperationmultiply.c
index 52bf728..53e2590 100644
--- a/app/operations/gimpoperationmultiply.c
+++ b/app/operations/layer-modes/gimpoperationmultiply.c
@@ -24,7 +24,7 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "operations/operations-types.h"
#include "gimpoperationmultiply.h"
diff --git a/app/operations/gimpoperationmultiply.h b/app/operations/layer-modes/gimpoperationmultiply.h
similarity index 95%
rename from app/operations/gimpoperationmultiply.h
rename to app/operations/layer-modes/gimpoperationmultiply.h
index ec3e02b..9a0ff51 100644
--- a/app/operations/gimpoperationmultiply.h
+++ b/app/operations/layer-modes/gimpoperationmultiply.h
@@ -22,7 +22,9 @@
#ifndef __GIMP_OPERATION_MULTIPLY_H__
#define __GIMP_OPERATION_MULTIPLY_H__
-#include "gimpoperationpointlayermode.h"
+
+#include "operations/gimpoperationpointlayermode.h"
+
#define GIMP_TYPE_OPERATION_MULTIPLY (gimp_operation_multiply_get_type ())
#define GIMP_OPERATION_MULTIPLY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_MULTIPLY, GimpOperationMultiply))
@@ -46,7 +48,7 @@ struct _GimpOperationMultiplyClass
};
-GType gimp_operation_multiply_get_type (void) G_GNUC_CONST;
+GType gimp_operation_multiply_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_multiply_process_pixels (gfloat *in,
gfloat *layer,
@@ -57,4 +59,5 @@ gboolean gimp_operation_multiply_process_pixels (gfloat *in,
const GeglRectangle *roi,
gint level);
+
#endif /* __GIMP_OPERATION_MULTIPLY_H__ */
diff --git a/app/operations/gimpoperationnormalmode-sse2.c
b/app/operations/layer-modes/gimpoperationnormal-sse2.c
similarity index 76%
rename from app/operations/gimpoperationnormalmode-sse2.c
rename to app/operations/layer-modes/gimpoperationnormal-sse2.c
index 6bd5890..de69a53 100644
--- a/app/operations/gimpoperationnormalmode-sse2.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse2.c
@@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
- * gimpoperationnormalmode-sse2.c
+ * gimpoperationnormal-sse2.c
* Copyright (C) 2013 Daniel Sabo
*
* This program is free software: you can redistribute it and/or modify
@@ -22,30 +22,31 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "operations/operations-types.h"
+
+#include "gimpoperationnormal.h"
-#include "gimpoperationnormalmode.h"
#if COMPILE_SSE2_INTRINISICS
/* SSE2 */
#include <emmintrin.h>
gboolean
-gimp_operation_normal_mode_process_pixels_sse2 (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_normal_process_pixels_sse2 (gfloat *in,
+ gfloat *aux,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
/* check alignment */
if ((((uintptr_t)in) | ((uintptr_t)aux) | ((uintptr_t)out)) & 0x0F)
{
- return gimp_operation_normal_mode_process_pixels_core (in, aux, mask, out,
- opacity, samples,
- roi, level);
+ return gimp_operation_normal_process_pixels_core (in, aux, mask, out,
+ opacity, samples,
+ roi, level);
}
else
{
diff --git a/app/operations/gimpoperationnormalmode-sse4.c
b/app/operations/layer-modes/gimpoperationnormal-sse4.c
similarity index 76%
rename from app/operations/gimpoperationnormalmode-sse4.c
rename to app/operations/layer-modes/gimpoperationnormal-sse4.c
index 9d8d3cc..29e33c4 100644
--- a/app/operations/gimpoperationnormalmode-sse4.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse4.c
@@ -22,30 +22,31 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "operations/operations-types.h"
+
+#include "gimpoperationnormal.h"
-#include "gimpoperationnormalmode.h"
#if COMPILE_SSE4_1_INTRINISICS
/* SSE4 */
#include <smmintrin.h>
gboolean
-gimp_operation_normal_mode_process_pixels_sse4 (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_normal_process_pixels_sse4 (gfloat *in,
+ gfloat *aux,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
/* check alignment */
if ((((uintptr_t)in) | ((uintptr_t)aux) | ((uintptr_t)out)) & 0x0F)
{
- return gimp_operation_normal_mode_process_pixels_core (in, aux, mask, out,
- opacity, samples,
- roi, level);
+ return gimp_operation_normal_process_pixels_core (in, aux, mask, out,
+ opacity, samples,
+ roi, level);
}
else
{
diff --git a/app/operations/gimpoperationnormalmode.c b/app/operations/layer-modes/gimpoperationnormal.c
similarity index 75%
rename from app/operations/gimpoperationnormalmode.c
rename to app/operations/layer-modes/gimpoperationnormal.c
index fa44cc3..528242e 100644
--- a/app/operations/gimpoperationnormalmode.c
+++ b/app/operations/layer-modes/gimpoperationnormal.c
@@ -25,12 +25,12 @@
#include "libgimpbase/gimpbase.h"
-#include "operations-types.h"
+#include "operations/operations-types.h"
-#include "gimpoperationnormalmode.h"
+#include "gimpoperationnormal.h"
-GimpLayerModeFunction gimp_operation_normal_mode_process_pixels = NULL;
+GimpLayerModeFunction gimp_operation_normal_process_pixels = NULL;
static gboolean gimp_operation_normal_parent_process (GeglOperation *operation,
@@ -38,7 +38,7 @@ static gboolean gimp_operation_normal_parent_process (GeglOperation *oper
const gchar *output_prop,
const GeglRectangle *result,
gint level);
-static gboolean gimp_operation_normal_mode_process (GeglOperation *operation,
+static gboolean gimp_operation_normal_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
@@ -48,10 +48,10 @@ static gboolean gimp_operation_normal_mode_process (GeglOperation *oper
gint level);
-G_DEFINE_TYPE (GimpOperationNormalMode, gimp_operation_normal_mode,
+G_DEFINE_TYPE (GimpOperationNormal, gimp_operation_normal,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
-#define parent_class gimp_operation_normal_mode_parent_class
+#define parent_class gimp_operation_normal_parent_class
static const gchar* reference_xml = "<?xml version='1.0' encoding='UTF-8'?>"
"<gegl>"
@@ -71,7 +71,7 @@ static const gchar* reference_xml = "<?xml version='1.0' encoding='UTF-8'?>"
static void
-gimp_operation_normal_mode_class_init (GimpOperationNormalModeClass *klass)
+gimp_operation_normal_class_init (GimpOperationNormalClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@@ -88,23 +88,23 @@ gimp_operation_normal_mode_class_init (GimpOperationNormalModeClass *klass)
operation_class->process = gimp_operation_normal_parent_process;
- point_class->process = gimp_operation_normal_mode_process;
+ point_class->process = gimp_operation_normal_process;
- gimp_operation_normal_mode_process_pixels = gimp_operation_normal_mode_process_pixels_core;
+ gimp_operation_normal_process_pixels = gimp_operation_normal_process_pixels_core;
#if COMPILE_SSE2_INTRINISICS
if (gimp_cpu_accel_get_support() & GIMP_CPU_ACCEL_X86_SSE2)
- gimp_operation_normal_mode_process_pixels = gimp_operation_normal_mode_process_pixels_sse2;
+ gimp_operation_normal_process_pixels = gimp_operation_normal_process_pixels_sse2;
#endif /* COMPILE_SSE2_INTRINISICS */
#if COMPILE_SSE4_1_INTRINISICS
if (gimp_cpu_accel_get_support() & GIMP_CPU_ACCEL_X86_SSE4_1)
- gimp_operation_normal_mode_process_pixels = gimp_operation_normal_mode_process_pixels_sse4;
+ gimp_operation_normal_process_pixels = gimp_operation_normal_process_pixels_sse4;
#endif /* COMPILE_SSE4_1_INTRINISICS */
}
static void
-gimp_operation_normal_mode_init (GimpOperationNormalMode *self)
+gimp_operation_normal_init (GimpOperationNormal *self)
{
}
@@ -164,29 +164,29 @@ gimp_operation_normal_parent_process (GeglOperation *operation,
}
static gboolean
-gimp_operation_normal_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_normal_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
- return gimp_operation_normal_mode_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples,
roi, level);
+ return gimp_operation_normal_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi,
level);
}
gboolean
-gimp_operation_normal_mode_process_pixels_core (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_normal_process_pixels_core (gfloat *in,
+ gfloat *aux,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
const gboolean has_mask = mask != NULL;
diff --git a/app/operations/layer-modes/gimpoperationnormal.h
b/app/operations/layer-modes/gimpoperationnormal.h
new file mode 100644
index 0000000..2673233
--- /dev/null
+++ b/app/operations/layer-modes/gimpoperationnormal.h
@@ -0,0 +1,81 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationnormal.h
+ * Copyright (C) 2012 Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_OPERATION_NORMAL_H__
+#define __GIMP_OPERATION_NORMAL_H__
+
+
+#include "operations/gimpoperationpointlayermode.h"
+
+
+#define GIMP_TYPE_OPERATION_NORMAL (gimp_operation_normal_get_type ())
+#define GIMP_OPERATION_NORMAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_NORMAL, GimpOperationNormal))
+#define GIMP_OPERATION_NORMAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_NORMAL, GimpOperationNormalClass))
+#define GIMP_IS_OPERATION_NORMAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_NORMAL))
+#define GIMP_IS_OPERATION_NORMAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_NORMAL))
+#define GIMP_OPERATION_NORMAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_NORMAL, GimpOperationNormalClass))
+
+
+typedef struct _GimpOperationNormal GimpOperationNormal;
+typedef struct _GimpOperationNormalClass GimpOperationNormalClass;
+
+struct _GimpOperationNormal
+{
+ GimpOperationPointLayerMode parent_instance;
+};
+
+struct _GimpOperationNormalClass
+{
+ GimpOperationPointLayerModeClass parent_class;
+};
+
+
+GType gimp_operation_normal_get_type (void) G_GNUC_CONST;
+
+extern GimpLayerModeFunction gimp_operation_normal_process_pixels;
+
+gboolean gimp_operation_normal_process_pixels_core (gfloat *in,
+ gfloat *aux,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+gboolean gimp_operation_normal_process_pixels_sse2 (gfloat *in,
+ gfloat *aux,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+gboolean gimp_operation_normal_process_pixels_sse4 (gfloat *in,
+ gfloat *aux,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+#endif /* __GIMP_OPERATION_NORMAL_H__ */
diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index 430c7c3..10e82bf 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -102,6 +102,8 @@ LDADD = \
$(top_builddir)/app/libapp.a \
$(top_builddir)/app/gegl/libappgegl.a \
$(top_builddir)/app/operations/libappoperations.a \
+ $(top_builddir)/app/operations/layer-modes/libapplayermodes.a \
+ $(top_builddir)/app/operations/layer-modes-legacy/libapplayermodeslegacy.a \
libgimpapptestutils.a \
$(libgimpwidgets) \
$(libgimpconfig) \
diff --git a/configure.ac b/configure.ac
index 918b78b..b817961 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2366,6 +2366,8 @@ app/actions/Makefile
app/config/Makefile
app/core/Makefile
app/operations/Makefile
+app/operations/layer-modes/Makefile
+app/operations/layer-modes-legacy/Makefile
app/operations/tests/Makefile
app/gegl/Makefile
app/dialogs/Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]