onscreen/native: Move rgb range support to OutputInfo
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3552>
This commit is contained in:
parent
706bee2a58
commit
0dc43c04ee
@ -653,15 +653,16 @@ set_rgb_range (MetaOutputKms *output_kms,
|
||||
MetaKmsUpdate *kms_update)
|
||||
{
|
||||
MetaOutput *output = META_OUTPUT (output_kms);
|
||||
const MetaOutputInfo *output_info = meta_output_get_info (output);
|
||||
MetaKmsConnector *kms_connector =
|
||||
meta_output_kms_get_kms_connector (output_kms);
|
||||
MetaOutputRGBRange rgb_range = meta_output_peek_rgb_range (output);
|
||||
|
||||
if (rgb_range == META_OUTPUT_RGB_RANGE_AUTO &&
|
||||
!meta_kms_connector_is_broadcast_rgb_supported (kms_connector, rgb_range))
|
||||
!(output_info->supported_rgb_ranges & (1 << rgb_range)))
|
||||
return;
|
||||
|
||||
if (!meta_kms_connector_is_broadcast_rgb_supported (kms_connector, rgb_range))
|
||||
if (!(output_info->supported_rgb_ranges & (1 << rgb_range)))
|
||||
{
|
||||
g_warning ("Ignoring unsupported RGB Range");
|
||||
return;
|
||||
|
@ -427,6 +427,8 @@ meta_output_kms_new (MetaGpuKms *gpu_kms,
|
||||
output_info->supports_privacy_screen =
|
||||
(connector_state->privacy_screen_state != META_PRIVACY_SCREEN_UNAVAILABLE);
|
||||
|
||||
output_info->supported_rgb_ranges = connector_state->broadcast_rgb.supported;
|
||||
|
||||
output = g_object_new (META_TYPE_OUTPUT_KMS,
|
||||
"id", ((uint64_t) gpu_id << 32) | connector_id,
|
||||
"gpu", gpu,
|
||||
|
Loading…
Reference in New Issue
Block a user