![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
The module's private state. Declared here for the module's own .c files only. More...
#include <colorspaces.h>
Collaboration diagram for dt_colorspaces_t:Data Fields | |
| GList * | profiles |
| gchar * | colord_profile_file |
| uint8_t * | xprofile_data |
| int | xprofile_size |
| cmsHTRANSFORM | transform_srgb_to_display |
| cmsHTRANSFORM | transform_adobe_rgb_to_display |
| cmsHTRANSFORM | transform_xyz_to_display |
| cmsHTRANSFORM | transform_display_to_adobe_rgb |
Settings group | |
The seven fields the GUI writes and the pipeline reads. Read them through dt_colorprofiles_get_settings() and write them through the setters, which serialise on a lock private to colorspaces.c. Reading them directly is seven unsynchronised loads, and a 512-byte filename read while g_strlcpy() is writing it is a TORN string, not merely a stale one. | |
| dt_colorspaces_color_profile_type_t | display_type |
| dt_colorspaces_color_profile_type_t | softproof_type |
| char | display_filename [512] |
| char | softproof_filename [512] |
| dt_iop_color_intent_t | display_intent |
| dt_iop_color_intent_t | softproof_intent |
| dt_colorspaces_color_mode_t | mode |
The module's private state. Declared here for the module's own .c files only.
Nothing outside src/colorprofiles/ names this type, and the single instance is file-static in colorspaces.c – there is no accessor for it in this header. It is documented because the module's own translation units share it, not because it is an interface.
Almost all of it is immutable after dt_colorprofiles_init(). Exactly two things mutate afterwards, both guarded by the transforms lock: the DT_COLORSPACE_DISPLAY entry's cmsHPROFILE, and the four prepared transforms derived from it.
_transforms_lock OUTER, the settings lock (private to colorspaces.c) INNER. The display setters need both, because changing the display profile identity also rebuilds the four transforms. Nothing takes them the other way round. Definition at line 136 of file colorspaces.h.
| gchar* dt_colorspaces_t::colord_profile_file |
Guards the DT_COLORSPACE_DISPLAY entry's cmsHPROFILE and the four transforms below – the only mutable state in the module. Do not take it by hand: use dt_colorspaces_lock_profiles() / dt_colorspaces_unlock_profiles(). Path colord last reported for this window, kept so an unchanged path costs nothing.
Definition at line 150 of file colorspaces.h.
Referenced by _colorspaces_destroy().
| char dt_colorspaces_t::display_filename[512] |
Definition at line 167 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), dt_colorprofiles_get_settings(), and dt_colorprofiles_set_display_profile_choice().
| dt_iop_color_intent_t dt_colorspaces_t::display_intent |
Definition at line 169 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), dt_colorprofiles_get_settings(), and dt_colorprofiles_set_display_intent().
| dt_colorspaces_color_profile_type_t dt_colorspaces_t::display_type |
Definition at line 165 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), dt_colorprofiles_get_settings(), and dt_colorprofiles_set_display_profile_choice().
| dt_colorspaces_color_mode_t dt_colorspaces_t::mode |
Definition at line 172 of file colorspaces.h.
Referenced by _colorspaces_destroy(), dt_colorprofiles_get_settings(), dt_colorprofiles_set_mode(), and dt_colorprofiles_toggle_mode().
| GList* dt_colorspaces_t::profiles |
Every registered profile, as dt_colorspaces_color_profile_t *, in REGISTRATION order. That order is load-bearing: it is what dt_colorspaces_enumerate_profiles() reproduces and what every stored combo index in every preset and conf key refers to. Built once by init, sorted per directory batch before positions are handed out, and never appended to at runtime.
Definition at line 143 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _get_profile(), _update_display_profile(), dt_colorspaces_enumerate_profiles(), dt_colorspaces_profile_at(), dt_colorspaces_profile_exists(), and dt_colorspaces_profile_index().
| char dt_colorspaces_t::softproof_filename[512] |
Definition at line 168 of file colorspaces.h.
Referenced by _colorspaces_destroy(), dt_colorprofiles_get_settings(), and dt_colorprofiles_set_softproof_profile_choice().
| dt_iop_color_intent_t dt_colorspaces_t::softproof_intent |
Definition at line 170 of file colorspaces.h.
Referenced by _colorspaces_destroy(), dt_colorprofiles_get_settings(), and dt_colorprofiles_set_softproof_intent().
| dt_colorspaces_color_profile_type_t dt_colorspaces_t::softproof_type |
Definition at line 166 of file colorspaces.h.
Referenced by _colorspaces_destroy(), dt_colorprofiles_get_settings(), and dt_colorprofiles_set_softproof_profile_choice().
| cmsHTRANSFORM dt_colorspaces_t::transform_adobe_rgb_to_display |
Definition at line 179 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), and dt_colorprofiles_rgba8_to_display_bgra8().
| cmsHTRANSFORM dt_colorspaces_t::transform_display_to_adobe_rgb |
Definition at line 179 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), and dt_colorprofiles_bgra8_to_adobergb_rgba8().
| cmsHTRANSFORM dt_colorspaces_t::transform_srgb_to_display |
The prepared display transforms. Deleted and rebuilt in one go whenever the monitor profile or the display intent changes, so a borrowed handle can be freed under its user. They are reachable only through the entry points further down this header, each of which holds the read lock for the whole conversion.
Definition at line 179 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), dt_colorprofiles_rgba8_to_display_bgra8(), and dt_colorprofiles_srgb_to_display_strided().
| cmsHTRANSFORM dt_colorspaces_t::transform_xyz_to_display |
Definition at line 179 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_transforms(), and dt_colorprofiles_xyz_to_display().
| uint8_t* dt_colorspaces_t::xprofile_data |
Raw bytes of the monitor profile last read from the xatom or colord, and their length. A new read is compared against these, and the transforms are rebuilt only when the bytes actually differ.
Definition at line 154 of file colorspaces.h.
Referenced by _colorspaces_destroy(), _update_display_profile(), and dt_colorspaces_set_display_profile().
| int dt_colorspaces_t::xprofile_size |
Definition at line 155 of file colorspaces.h.
Referenced by _update_display_profile(), and dt_colorspaces_set_display_profile().