gegl r2135 - in trunk: . gegl gegl/process
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2135 - in trunk: . gegl gegl/process
- Date: Fri, 29 Feb 2008 01:08:38 +0000 (GMT)
Author: ok
Date: Fri Feb 29 01:08:38 2008
New Revision: 2135
URL: http://svn.gnome.org/viewvc/gegl?rev=2135&view=rev
Log:
* configure.ac: modified --enable-mp, it is now disabled by default.
* gegl/gegl-init.c: (gegl_init): initialize gthread if ENABLE_MP is
set.
* gegl/process/gegl-processor.c: (gegl_processor_work): do actual
processing in auxiliary thread (currently lacks sufficient locking to
work properly, but when it does work both the GEGL gui and GIMP are
more responsive.)
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/gegl/gegl-init.c
trunk/gegl/process/gegl-processor.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Feb 29 01:08:38 2008
@@ -305,14 +305,16 @@
# Threads and multi processor
#############################
-AC_ARG_ENABLE(mp, [ --disable-mp disable support for multiple processors])
+AC_ARG_ENABLE(mp, [ --enable-mp enable experimental support for multiple processors], ,
+enable_mp=no
+)
+
if test "x$enable_mp" != "xno"; then
- PKG_CHECK_MODULES(GTHREAD, gthread-2.0,
- [AC_DEFINE(ENABLE_MP, 1,
- [Define to 1 to enable support for multiple processors.])]
- )
+ AC_DEFINE(ENABLE_MP, 1,
+ [Define to 1 to enable support for multiple processors.])
fi
+
dnl Checks for programs.
#AC_PROG_YACC
#AM_PROG_LEX
@@ -729,6 +731,7 @@
GEGL docs: $enable_docs
Build workshop: $enable_workshop
Build website: $have_asciidoc
+ Multiprocessor: $enable_mp
Optional dependencies:
GTK+: $have_gtk
Modified: trunk/gegl/gegl-init.c
==============================================================================
--- trunk/gegl/gegl-init.c (original)
+++ trunk/gegl/gegl-init.c Fri Feb 29 01:08:38 2008
@@ -80,8 +80,11 @@
{
if (gegl_initialized)
return;
- /*if (!g_thread_supported())
- g_thread_init (NULL);*/
+
+#if ENABLE_MP
+ if (!g_thread_supported())
+ g_thread_init (NULL);
+#endif
/* If any command-line actions are ever added to GEGL, then the commented
* out code below should be used. Until then, we simply call the parse hook
Modified: trunk/gegl/process/gegl-processor.c
==============================================================================
--- trunk/gegl/process/gegl-processor.c (original)
+++ trunk/gegl/process/gegl-processor.c Fri Feb 29 01:08:38 2008
@@ -645,9 +645,7 @@
}
-/*#define ENABLE_THREADING*/
-/*#ifdef ENABLE_THREADING*/
-#if 0
+#if ENABLE_MP
gpointer render_thread (gpointer data)
{
@@ -706,7 +704,11 @@
if (processor->context)
{
- gegl_operation_process (processor->node->operation, cache, "foo");
+ gegl_operation_process (processor->node->operation,
+ processor->context,
+ "output" /* ignored output_pad */,
+ &processor->context->result_rect
+ );
gegl_node_remove_context (processor->node, cache);
processor->context = NULL;
if (progress)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]