![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <glib.h>
Include dependency graph for gui_throttle.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Typedefs | |
| typedef G_BEGIN_DECLS enum dt_throttle_slot_t | dt_throttle_slot_t |
| typedef void(* | dt_gui_throttle_callback_t) (gpointer user_data) |
Enumerations | |
| enum | dt_throttle_slot_t { DT_THROTTLE_SLOT_MAIN = 0 , DT_THROTTLE_SLOT_PREVIEW , DT_THROTTLE_SLOT_OTHER } |
Functions | |
| void | dt_gui_throttle_init (int saved_runtime_us) |
| void | dt_gui_throttle_set_timeout_ms (guint timeout_ms) |
| void | dt_gui_throttle_cleanup (void) |
| void | dt_gui_throttle_record_runtime (dt_throttle_slot_t slot, gint64 runtime_us) |
| int | dt_gui_throttle_get_runtime_us (void) |
| int | dt_gui_throttle_get_pipe_runtime_us (dt_throttle_slot_t slot) |
| 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) |
| typedef void(* dt_gui_throttle_callback_t) (gpointer user_data) |
Definition at line 19 of file gui_throttle.h.
| typedef G_BEGIN_DECLS enum dt_throttle_slot_t dt_throttle_slot_t |
| enum dt_throttle_slot_t |
| Enumerator | |
|---|---|
| DT_THROTTLE_SLOT_MAIN | |
| DT_THROTTLE_SLOT_PREVIEW | |
| DT_THROTTLE_SLOT_OTHER | |
Definition at line 12 of file gui_throttle.h.
| void dt_gui_throttle_cancel | ( | gpointer | source | ) |
Definition at line 283 of file gui_throttle.c.
References _gui_throttle, IS_NULL_PTR, dt_gui_throttle_state_t::pending_tasks, dt_gui_throttle_task_t::source, and dt_gui_throttle_state_t::timeout_source.
Referenced by _area_button_release_callback(), cleanup(), dt_dev_cleanup(), dt_gui_throttle_queue(), gui_cleanup(), and leave().
Definition at line 146 of file gui_throttle.c.
References _gui_throttle, dt_pthread_mutex_destroy(), dt_gui_throttle_state_t::pending_tasks, dt_gui_throttle_state_t::runtime_mutex, and dt_gui_throttle_state_t::timeout_source.
Referenced by dt_cleanup().
| int dt_gui_throttle_get_pipe_runtime_us | ( | dt_throttle_slot_t | slot | ) |
Definition at line 223 of file gui_throttle.c.
References _gui_throttle, dt_gui_throttle_state_t::avg_full_runtime_us, dt_gui_throttle_state_t::avg_preview_runtime_us, dt_atomic_get_int(), dt_gui_throttle_get_runtime_us(), DT_THROTTLE_SLOT_MAIN, DT_THROTTLE_SLOT_OTHER, DT_THROTTLE_SLOT_PREVIEW, and MAX.
Referenced by _live_publish_interval_us().
| int dt_gui_throttle_get_runtime_us | ( | void | ) |
Definition at line 218 of file gui_throttle.c.
References _gui_throttle, dt_gui_throttle_state_t::avg_runtime_us, dt_atomic_get_int(), and MAX.
Referenced by dt_cleanup(), and dt_gui_throttle_get_pipe_runtime_us().
| guint dt_gui_throttle_get_timeout_ms | ( | void | ) |
Definition at line 239 of file gui_throttle.c.
References _effective_timeout_ms().
Referenced by _queue_pending_commit(), and dt_dev_history_flush_pending_commits().
| gint64 dt_gui_throttle_get_timeout_us | ( | void | ) |
Definition at line 244 of file gui_throttle.c.
References _effective_timeout_ms().
| void dt_gui_throttle_init | ( | int | saved_runtime_us | ) |
| saved_runtime_us | the average redraw time persisted from the last session, or 0. |
Definition at line 118 of file gui_throttle.c.
References _gui_throttle, dt_gui_throttle_state_t::avg_full_runtime_us, dt_gui_throttle_state_t::avg_preview_runtime_us, dt_gui_throttle_state_t::avg_runtime_us, dt_atomic_set_int(), dt_pthread_mutex_init(), i, MAX, dt_gui_throttle_state_t::pending_tasks, dt_gui_throttle_state_t::recent_full_runtime_count, dt_gui_throttle_state_t::recent_full_runtime_pos, dt_gui_throttle_state_t::recent_full_runtime_us, dt_gui_throttle_state_t::recent_preview_runtime_count, dt_gui_throttle_state_t::recent_preview_runtime_pos, dt_gui_throttle_state_t::recent_preview_runtime_us, dt_gui_throttle_state_t::recent_runtime_count, dt_gui_throttle_state_t::recent_runtime_pos, dt_gui_throttle_state_t::recent_runtime_us, and dt_gui_throttle_state_t::runtime_mutex.
Referenced by dt_init().
| void dt_gui_throttle_queue | ( | gpointer | source, |
| dt_gui_throttle_callback_t | callback, | ||
| gpointer | user_data | ||
| ) |
Definition at line 251 of file gui_throttle.c.
References _dispatch_pending_tasks(), _effective_timeout_ms(), _find_task(), _gui_throttle, dt_gui_throttle_task_t::callback, dt_gui_throttle_cancel(), IS_NULL_PTR, dt_gui_throttle_state_t::pending_tasks, dt_gui_throttle_task_t::source, dt_gui_throttle_state_t::timeout_source, and dt_gui_throttle_task_t::user_data.
Referenced by _area_button_press_callback(), _area_motion_notify_callback(), _delayed_history_commit(), _queue_delayed_history_commit(), button_pressed(), and scrolled().
| void dt_gui_throttle_record_runtime | ( | dt_throttle_slot_t | slot, |
| gint64 | runtime_us | ||
| ) |
Definition at line 162 of file gui_throttle.c.
References _gui_throttle, dt_gui_throttle_state_t::avg_full_runtime_us, dt_gui_throttle_state_t::avg_preview_runtime_us, dt_gui_throttle_state_t::avg_runtime_us, dt_atomic_set_int(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), DT_THROTTLE_SLOT_MAIN, DT_THROTTLE_SLOT_OTHER, DT_THROTTLE_SLOT_PREVIEW, i, MAX, MIN, dt_gui_throttle_state_t::recent_full_runtime_count, dt_gui_throttle_state_t::recent_full_runtime_pos, dt_gui_throttle_state_t::recent_full_runtime_us, dt_gui_throttle_state_t::recent_preview_runtime_count, dt_gui_throttle_state_t::recent_preview_runtime_pos, dt_gui_throttle_state_t::recent_preview_runtime_us, dt_gui_throttle_state_t::recent_runtime_count, dt_gui_throttle_state_t::recent_runtime_pos, dt_gui_throttle_state_t::recent_runtime_us, and dt_gui_throttle_state_t::runtime_mutex.
Referenced by dt_dev_darkroom_pipeline().
| void dt_gui_throttle_set_timeout_ms | ( | guint | timeout_ms | ) |
Maximum time a queued task may wait, in ms. Set by the host from its preferences; 0 disables the timeout.
Definition at line 72 of file gui_throttle.c.
References _user_timeout_ms.
Referenced by dt_init().