color: Show sRGB and AdobeRGB profiles when selecting a profile for a display
The logic here is that you can make expensive hardware emulate a known color space, for which you shouldn't need to generate a custom profile for.
This commit is contained in:
parent
e759f28020
commit
fe3a7df31e
1 changed files with 17 additions and 0 deletions
|
@ -601,6 +601,7 @@ gcm_prefs_is_profile_suitable_for_device (CdProfile *profile,
|
|||
CdColorspace device_colorspace = 0;
|
||||
gboolean ret = FALSE;
|
||||
CdDeviceKind device_kind;
|
||||
CdStandardSpace standard_space;
|
||||
|
||||
/* not the right colorspace */
|
||||
device_colorspace = cd_device_get_colorspace (device);
|
||||
|
@ -608,6 +609,22 @@ gcm_prefs_is_profile_suitable_for_device (CdProfile *profile,
|
|||
if (device_colorspace != profile_colorspace)
|
||||
goto out;
|
||||
|
||||
/* if this is a display matching with one of the standard spaces that displays
|
||||
* could emulate, also mark it as suitable */
|
||||
if (cd_device_get_kind (device) == CD_DEVICE_KIND_DISPLAY &&
|
||||
cd_profile_get_kind (profile) == CD_PROFILE_KIND_DISPLAY_DEVICE)
|
||||
{
|
||||
data_source = cd_profile_get_metadata_item (profile,
|
||||
CD_PROFILE_METADATA_STANDARD_SPACE);
|
||||
standard_space = cd_standard_space_from_string (data_source);
|
||||
if (standard_space == CD_STANDARD_SPACE_SRGB ||
|
||||
standard_space == CD_STANDARD_SPACE_ADOBE_RGB)
|
||||
{
|
||||
ret = TRUE;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/* not the correct kind */
|
||||
device_kind = cd_device_get_kind (device);
|
||||
profile_kind_tmp = cd_profile_get_kind (profile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue