app: more gimp-parallel fixes
Fix indentation in gimp-parallel.{cc,h}. Remove unused typedefs in gimp-parallel.h. s/Gimp/Gegl/ in function-type cast in gimphistogram.c.
This commit is contained in:
@ -70,29 +70,29 @@ typedef struct
|
|||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
static void gimp_parallel_notify_num_processors (GimpGeglConfig *config);
|
static void gimp_parallel_notify_num_processors (GimpGeglConfig *config);
|
||||||
|
|
||||||
static void gimp_parallel_set_n_threads (gint n_threads,
|
static void gimp_parallel_set_n_threads (gint n_threads,
|
||||||
gboolean finish_tasks);
|
gboolean finish_tasks);
|
||||||
|
|
||||||
static void gimp_parallel_run_async_set_n_threads (gint n_threads,
|
static void gimp_parallel_run_async_set_n_threads (gint n_threads,
|
||||||
gboolean finish_tasks);
|
gboolean finish_tasks);
|
||||||
static gpointer gimp_parallel_run_async_thread_func (GimpParallelRunAsyncThread *thread);
|
static gpointer gimp_parallel_run_async_thread_func (GimpParallelRunAsyncThread *thread);
|
||||||
static void gimp_parallel_run_async_enqueue_task (GimpParallelRunAsyncTask *task);
|
static void gimp_parallel_run_async_enqueue_task (GimpParallelRunAsyncTask *task);
|
||||||
static GimpParallelRunAsyncTask * gimp_parallel_run_async_dequeue_task (void);
|
static GimpParallelRunAsyncTask * gimp_parallel_run_async_dequeue_task (void);
|
||||||
static gboolean gimp_parallel_run_async_execute_task (GimpParallelRunAsyncTask *task);
|
static gboolean gimp_parallel_run_async_execute_task (GimpParallelRunAsyncTask *task);
|
||||||
static void gimp_parallel_run_async_abort_task (GimpParallelRunAsyncTask *task);
|
static void gimp_parallel_run_async_abort_task (GimpParallelRunAsyncTask *task);
|
||||||
static void gimp_parallel_run_async_cancel (GimpAsync *async);
|
static void gimp_parallel_run_async_cancel (GimpAsync *async);
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
|
|
||||||
static gint gimp_parallel_run_async_n_threads = 0;
|
static gint gimp_parallel_run_async_n_threads = 0;
|
||||||
static GimpParallelRunAsyncThread gimp_parallel_run_async_threads[GIMP_PARALLEL_RUN_ASYNC_MAX_THREADS];
|
static GimpParallelRunAsyncThread gimp_parallel_run_async_threads[GIMP_PARALLEL_RUN_ASYNC_MAX_THREADS];
|
||||||
|
|
||||||
static GMutex gimp_parallel_run_async_mutex;
|
static GMutex gimp_parallel_run_async_mutex;
|
||||||
static GCond gimp_parallel_run_async_cond;
|
static GCond gimp_parallel_run_async_cond;
|
||||||
static GQueue gimp_parallel_run_async_queue = G_QUEUE_INIT;
|
static GQueue gimp_parallel_run_async_queue = G_QUEUE_INIT;
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
@ -22,30 +22,21 @@
|
|||||||
#define __GIMP_PARALLEL_H__
|
#define __GIMP_PARALLEL_H__
|
||||||
|
|
||||||
|
|
||||||
typedef void (* GimpParallelRunAsyncFunc) (GimpAsync *async,
|
typedef void (* GimpParallelRunAsyncFunc) (GimpAsync *async,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
typedef void (* GimpParallelDistributeFunc) (gint i,
|
|
||||||
gint n,
|
|
||||||
gpointer user_data);
|
|
||||||
typedef void (* GimpParallelDistributeRangeFunc) (gsize offset,
|
|
||||||
gsize size,
|
|
||||||
gpointer user_data);
|
|
||||||
typedef void (* GimpParallelDistributeAreaFunc) (const GeglRectangle *area,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
|
|
||||||
void gimp_parallel_init (Gimp *gimp);
|
void gimp_parallel_init (Gimp *gimp);
|
||||||
void gimp_parallel_exit (Gimp *gimp);
|
void gimp_parallel_exit (Gimp *gimp);
|
||||||
|
|
||||||
GimpAsync * gimp_parallel_run_async (GimpParallelRunAsyncFunc func,
|
GimpAsync * gimp_parallel_run_async (GimpParallelRunAsyncFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
GimpAsync * gimp_parallel_run_async_full (gint priority,
|
GimpAsync * gimp_parallel_run_async_full (gint priority,
|
||||||
GimpParallelRunAsyncFunc func,
|
GimpParallelRunAsyncFunc func,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify user_data_destroy_func);
|
GDestroyNotify user_data_destroy_func);
|
||||||
GimpAsync * gimp_parallel_run_async_independent (GimpParallelRunAsyncFunc func,
|
GimpAsync * gimp_parallel_run_async_independent (GimpParallelRunAsyncFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -914,7 +914,7 @@ gimp_histogram_calculate_internal (GimpAsync *async,
|
|||||||
|
|
||||||
gegl_parallel_distribute_area (
|
gegl_parallel_distribute_area (
|
||||||
&context->buffer_rect, PIXELS_PER_THREAD, GEGL_SPLIT_STRATEGY_AUTO,
|
&context->buffer_rect, PIXELS_PER_THREAD, GEGL_SPLIT_STRATEGY_AUTO,
|
||||||
(GimpParallelDistributeAreaFunc) gimp_histogram_calculate_area,
|
(GeglParallelDistributeAreaFunc) gimp_histogram_calculate_area,
|
||||||
&data);
|
&data);
|
||||||
|
|
||||||
if (! async || ! gimp_async_is_canceled (async))
|
if (! async || ! gimp_async_is_canceled (async))
|
||||||
|
Reference in New Issue
Block a user