[gnome-control-center] color: Show sRGB and AdobeRGB profiles when selecting a profile for a display
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] color: Show sRGB and AdobeRGB profiles when selecting a profile for a display
- Date: Mon, 4 Feb 2013 11:51:59 +0000 (UTC)
commit fe3a7df31e5cdeec0042c0da5485031fb6a1057b
Author: Richard Hughes <richard hughsie com>
Date: Mon Feb 4 11:48:45 2013 +0000
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.
panels/color/cc-color-panel.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 05ffa53..f5e22c6 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]