backends: Split out CRTC/output management to MetaGpu

In order to eventually support multilpe GPUs with their own connectors,
split out related meta data management (i.e. outputs, CRTCs and CRTC
modes) into a new MetaGpu GObject.

The Xrandr backend always assumes there is always only a single "GPU" as
the GPU is abstracted by the X server; only the native backend (aside
from the test backend) will eventually see more than one GPU.

The Xrandr backend still moves some management to MetaGpuXrandr, in
order to behave more similarly to the KMS counterparts.

https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
Jonas Ådahl
2017-07-10 18:19:32 +08:00
parent 18ec86bd90
commit c1683073f1
36 changed files with 2397 additions and 1414 deletions

View File

@ -22,7 +22,7 @@
#include <glib-object.h>
#include "backends/meta-monitor-manager-private.h"
#include "backends/meta-gpu.h"
struct _MetaTileInfo
{
@ -62,7 +62,7 @@ struct _MetaOutput
{
GObject parent;
MetaMonitorManager *monitor_manager;
MetaGpu *gpu;
/* The CRTC driving this output, NULL if the output is not enabled */
MetaCrtc *crtc;
@ -119,6 +119,6 @@ struct _MetaOutput
#define META_TYPE_OUTPUT (meta_output_get_type ())
G_DECLARE_FINAL_TYPE (MetaOutput, meta_output, META, OUTPUT, GObject)
MetaMonitorManager * meta_output_get_monitor_manager (MetaOutput *output);
MetaGpu * meta_output_get_gpu (MetaOutput *output);
#endif /* META_OUTPUT_H */