mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 16:34:10 +00:00
monitor-manager: remove get_edid_file() vfunc
It wasn't implemented by any subclass, it's not provided by DRM either. And even if a subclass were to have only a file available, it could read it into a GBytes as well and just use `read_edid()`. Found this while working on !269.
This commit is contained in:
parent
6e1b14b26b
commit
49cb691bb5
@ -155,8 +155,6 @@ struct _MetaMonitorManagerClass
|
|||||||
{
|
{
|
||||||
MetaDBusDisplayConfigSkeletonClass parent_class;
|
MetaDBusDisplayConfigSkeletonClass parent_class;
|
||||||
|
|
||||||
char* (*get_edid_file) (MetaMonitorManager *,
|
|
||||||
MetaOutput *);
|
|
||||||
GBytes* (*read_edid) (MetaMonitorManager *,
|
GBytes* (*read_edid) (MetaMonitorManager *,
|
||||||
MetaOutput *);
|
MetaOutput *);
|
||||||
|
|
||||||
|
@ -769,13 +769,6 @@ meta_monitor_manager_real_read_edid (MetaMonitorManager *manager,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
|
||||||
meta_monitor_manager_real_get_edid_file (MetaMonitorManager *manager,
|
|
||||||
MetaOutput *output)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_monitor_manager_set_property (GObject *object,
|
meta_monitor_manager_set_property (GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
@ -823,7 +816,6 @@ meta_monitor_manager_class_init (MetaMonitorManagerClass *klass)
|
|||||||
object_class->get_property = meta_monitor_manager_get_property;
|
object_class->get_property = meta_monitor_manager_get_property;
|
||||||
object_class->set_property = meta_monitor_manager_set_property;
|
object_class->set_property = meta_monitor_manager_set_property;
|
||||||
|
|
||||||
klass->get_edid_file = meta_monitor_manager_real_get_edid_file;
|
|
||||||
klass->read_edid = meta_monitor_manager_real_read_edid;
|
klass->read_edid = meta_monitor_manager_real_read_edid;
|
||||||
|
|
||||||
signals[MONITORS_CHANGED_INTERNAL] =
|
signals[MONITORS_CHANGED_INTERNAL] =
|
||||||
@ -1024,7 +1016,6 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
|
|||||||
MetaOutput *output = l->data;
|
MetaOutput *output = l->data;
|
||||||
GVariantBuilder crtcs, modes, clones, properties;
|
GVariantBuilder crtcs, modes, clones, properties;
|
||||||
GBytes *edid;
|
GBytes *edid;
|
||||||
char *edid_file;
|
|
||||||
MetaCrtc *crtc;
|
MetaCrtc *crtc;
|
||||||
int crtc_index;
|
int crtc_index;
|
||||||
|
|
||||||
@ -1086,23 +1077,13 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
|
|||||||
g_variant_builder_add (&properties, "{sv}", "supports-underscanning",
|
g_variant_builder_add (&properties, "{sv}", "supports-underscanning",
|
||||||
g_variant_new_boolean (output->supports_underscanning));
|
g_variant_new_boolean (output->supports_underscanning));
|
||||||
|
|
||||||
edid_file = manager_class->get_edid_file (manager, output);
|
edid = manager_class->read_edid (manager, output);
|
||||||
if (edid_file)
|
if (edid)
|
||||||
{
|
{
|
||||||
g_variant_builder_add (&properties, "{sv}", "edid-file",
|
g_variant_builder_add (&properties, "{sv}", "edid",
|
||||||
g_variant_new_take_string (edid_file));
|
g_variant_new_from_bytes (G_VARIANT_TYPE ("ay"),
|
||||||
}
|
edid, TRUE));
|
||||||
else
|
g_bytes_unref (edid);
|
||||||
{
|
|
||||||
edid = manager_class->read_edid (manager, output);
|
|
||||||
|
|
||||||
if (edid)
|
|
||||||
{
|
|
||||||
g_variant_builder_add (&properties, "{sv}", "edid",
|
|
||||||
g_variant_new_from_bytes (G_VARIANT_TYPE ("ay"),
|
|
||||||
edid, TRUE));
|
|
||||||
g_bytes_unref (edid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (output->tile_info.group_id)
|
if (output->tile_info.group_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user