2019-08-21 22:07:37 +02:00
|
|
|
#ifndef PRIVATE_H
|
|
|
|
#define PRIVATE_H
|
|
|
|
|
|
|
|
#include "libhwc.h"
|
|
|
|
#include "list.h"
|
|
|
|
|
|
|
|
struct hwc_display {
|
|
|
|
int drm_fd;
|
|
|
|
|
2019-09-08 14:26:50 +02:00
|
|
|
struct hwc_list planes; /* hwc_plane.link */
|
2019-08-21 22:07:37 +02:00
|
|
|
struct hwc_list outputs; /* hwc_output.link */
|
2019-09-08 16:41:25 +02:00
|
|
|
|
|
|
|
uint32_t *crtcs;
|
|
|
|
size_t crtcs_len;
|
2019-08-21 22:07:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct hwc_output {
|
|
|
|
struct hwc_display *display;
|
|
|
|
uint32_t crtc_id;
|
2019-09-08 16:41:25 +02:00
|
|
|
size_t crtc_index;
|
2019-08-21 22:07:37 +02:00
|
|
|
struct hwc_list link; /* hwc_display.outputs */
|
|
|
|
|
|
|
|
struct hwc_list layers; /* hwc_layer.link */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct hwc_layer {
|
|
|
|
struct hwc_output *output;
|
|
|
|
struct hwc_list link; /* hwc_output.layers */
|
|
|
|
|
|
|
|
struct hwc_layer_property *props;
|
|
|
|
size_t props_len;
|
|
|
|
|
|
|
|
struct hwc_plane *plane;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct hwc_layer_property {
|
|
|
|
char name[DRM_PROP_NAME_LEN];
|
|
|
|
uint64_t value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct hwc_plane {
|
|
|
|
uint32_t id;
|
|
|
|
uint32_t possible_crtcs;
|
2019-09-09 19:55:43 +02:00
|
|
|
uint32_t type;
|
2019-09-08 17:33:09 +02:00
|
|
|
int zpos; /* greater values mean closer to the eye */
|
2019-08-21 22:07:37 +02:00
|
|
|
/* TODO: formats */
|
2019-09-08 14:26:50 +02:00
|
|
|
struct hwc_list link; /* hwc_display.planes */
|
2019-08-21 22:07:37 +02:00
|
|
|
|
|
|
|
struct hwc_plane_property *props;
|
|
|
|
size_t props_len;
|
2019-08-23 17:48:13 +02:00
|
|
|
|
|
|
|
struct hwc_layer *layer;
|
2019-08-21 22:07:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct hwc_plane_property {
|
|
|
|
char name[DRM_PROP_NAME_LEN];
|
|
|
|
uint32_t id;
|
|
|
|
};
|
|
|
|
|
2019-09-12 10:10:03 +02:00
|
|
|
struct hwc_layer_property *layer_get_property(struct hwc_layer *layer,
|
|
|
|
const char *name);
|
|
|
|
|
2019-08-21 22:07:37 +02:00
|
|
|
#endif
|