Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
gui_throttle.c File Reference
#include "gui/gui_throttle.h"
#include "common/atomic.h"
#include "common/dtpthread.h"
#include "control/conf.h"
#include "develop/pixelpipe_hb.h"
#include <stdint.h>
+ Include dependency graph for gui_throttle.c:

Data Structures

struct  dt_gui_throttle_task_t
 
struct  dt_gui_throttle_state_t
 

Macros

#define DT_GUI_THROTTLE_RUNTIME_CONF   "processing/gui_throttle_runtime_us"
 

Typedefs

typedef struct dt_gui_throttle_task_t dt_gui_throttle_task_t
 
typedef struct dt_gui_throttle_state_t dt_gui_throttle_state_t
 

Functions

static dt_gui_throttle_task_t_find_task (gpointer source)
 
static guint _get_user_timeout_ms (void)
 
static guint _runtime_us_to_ms (const int runtime_us)
 
static guint _effective_timeout_ms (void)
 
static gboolean _dispatch_pending_tasks (gpointer user_data)
 
void dt_gui_throttle_init (void)
 
void dt_gui_throttle_cleanup (void)
 
void dt_gui_throttle_record_runtime (const dt_dev_pixelpipe_t *pipe, const gint64 runtime_us)
 
int dt_gui_throttle_get_runtime_us (void)
 
int dt_gui_throttle_get_pipe_runtime_us (const dt_dev_pixelpipe_type_t pipe_type)
 
guint dt_gui_throttle_get_timeout_ms (void)
 
gint64 dt_gui_throttle_get_timeout_us (void)
 
void dt_gui_throttle_queue (gpointer source, dt_gui_throttle_callback_t callback, gpointer user_data)
 
void dt_gui_throttle_cancel (gpointer source)
 

Variables

static dt_gui_throttle_state_t _gui_throttle = { 0 }
 

Macro Definition Documentation

◆ DT_GUI_THROTTLE_RUNTIME_CONF

#define DT_GUI_THROTTLE_RUNTIME_CONF   "processing/gui_throttle_runtime_us"

Typedef Documentation

◆ dt_gui_throttle_state_t

◆ dt_gui_throttle_task_t

Function Documentation

◆ _dispatch_pending_tasks()

◆ _effective_timeout_ms()

◆ _find_task()

static dt_gui_throttle_task_t * _find_task ( gpointer  source)
static

◆ _get_user_timeout_ms()

static guint _get_user_timeout_ms ( void  )
static

References dt_conf_get_int(), and MAX.

Referenced by _effective_timeout_ms().

◆ _runtime_us_to_ms()

static guint _runtime_us_to_ms ( const int  runtime_us)
static

References MAX.

Referenced by _effective_timeout_ms().

◆ dt_gui_throttle_cancel()

◆ dt_gui_throttle_cleanup()

◆ dt_gui_throttle_get_pipe_runtime_us()

◆ dt_gui_throttle_get_runtime_us()

int dt_gui_throttle_get_runtime_us ( void  )

◆ dt_gui_throttle_get_timeout_ms()

guint dt_gui_throttle_get_timeout_ms ( void  )

◆ dt_gui_throttle_get_timeout_us()

gint64 dt_gui_throttle_get_timeout_us ( void  )

◆ dt_gui_throttle_init()

◆ dt_gui_throttle_queue()

◆ dt_gui_throttle_record_runtime()

Variable Documentation

◆ _gui_throttle