[gegl] Initialize OpenCL in gegl_config



commit d17d2f08dbaf740b8f40eba8a891e50b379e9a95
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Mon Dec 10 15:06:40 2012 -0800

    Initialize OpenCL in gegl_config
    
    Initialize OpenCL only when the "use-opencl" setting changes.

 gegl/gegl-config.c            |    2 +-
 gegl/process/gegl-processor.c |    3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gegl/gegl-config.c b/gegl/gegl-config.c
index 5c156eb..e985f78 100644
--- a/gegl/gegl-config.c
+++ b/gegl/gegl-config.c
@@ -178,7 +178,7 @@ gegl_config_set_property (GObject      *gobject,
         config->use_opencl = g_value_get_boolean (value);
 
         if (config->use_opencl)
-          gegl_cl_init (NULL);
+          config->use_opencl = gegl_cl_init (NULL);
 
         break;
       case PROP_QUEUE_LIMIT:
diff --git a/gegl/process/gegl-processor.c b/gegl/process/gegl-processor.c
index d4d1356..71cb7e6 100644
--- a/gegl/process/gegl-processor.c
+++ b/gegl/process/gegl-processor.c
@@ -751,9 +751,6 @@ gegl_processor_work (GeglProcessor *processor,
 
   if (gegl_config()->use_opencl)
     {
-      /* Initialize OpenCL if wanted and possible */
-      gegl_cl_init (NULL);
-
       if (gegl_cl_is_accelerated ()
           && processor->chunk_size != GEGL_CL_CHUNK_SIZE)
         {


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