mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Merge branch 'wlr_output_group' into 'master'
Draft: output: introduce wlr_output_group See merge request wlroots/wlroots!4154
This commit is contained in:
commit
6d38da24b3
11 changed files with 801 additions and 5 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include <wlr/backend/session.h>
|
||||
#include <wlr/render/drm_format_set.h>
|
||||
#include <wlr/types/wlr_output_layer.h>
|
||||
#include <wlr/types/wlr_output_group.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include "backend/drm/iface.h"
|
||||
#include "backend/drm/properties.h"
|
||||
|
|
@ -219,6 +220,8 @@ struct wlr_drm_connector {
|
|||
uint32_t hdr_output_metadata;
|
||||
|
||||
int32_t refresh;
|
||||
|
||||
struct wlr_output_group_tile_info tile_info;
|
||||
};
|
||||
|
||||
struct wlr_drm_backend *get_drm_backend_from_backend(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ struct wlr_drm_connector_props {
|
|||
uint32_t panel_orientation; // not guaranteed to exist
|
||||
uint32_t content_type; // not guaranteed to exist
|
||||
uint32_t max_bpc; // not guaranteed to exist
|
||||
uint32_t tile; // not guaranteed to exist
|
||||
|
||||
// atomic-modesetting only
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ enum wlr_output_mode_aspect_ratio get_picture_aspect_ratio(const drmModeModeInfo
|
|||
const char *get_pnp_manufacturer(const char code[static 3]);
|
||||
// Populates the make/model/phys_{width,height} of output from the edid data
|
||||
void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
|
||||
void parse_tile(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
|
||||
const char *drm_connector_status_str(drmModeConnection status);
|
||||
void generate_cvt_mode(drmModeModeInfo *mode, int hdisplay, int vdisplay,
|
||||
float vrefresh);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ void output_defer_present(struct wlr_output *output, struct wlr_output_event_pre
|
|||
bool output_prepare_commit(struct wlr_output *output, const struct wlr_output_state *state);
|
||||
void output_apply_commit(struct wlr_output *output, const struct wlr_output_state *state);
|
||||
void output_send_commit_event(struct wlr_output *output, const struct wlr_output_state *state);
|
||||
void output_apply_state(struct wlr_output *output, const struct wlr_output_state *state);
|
||||
|
||||
void output_state_get_buffer_src_box(const struct wlr_output_state *state,
|
||||
struct wlr_fbox *out);
|
||||
|
|
|
|||
63
include/wlr/types/wlr_output_group.h
Normal file
63
include/wlr/types/wlr_output_group.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
#ifndef WLR_USE_UNSTABLE
|
||||
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
||||
#endif
|
||||
|
||||
#ifndef WLR_TYPES_WLR_OUTPUT_GROUP_H
|
||||
#define WLR_TYPES_WLR_OUTPUT_GROUP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <wlr/types/wlr_output_group.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/render/drm_format_set.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/backend.h>
|
||||
|
||||
struct wlr_output_group_tile_info {
|
||||
uint32_t group_id;
|
||||
uint32_t is_single_monitor;
|
||||
uint32_t num_h;
|
||||
uint32_t num_v;
|
||||
uint32_t h_loc;
|
||||
uint32_t v_loc;
|
||||
uint32_t h_size;
|
||||
uint32_t v_size;
|
||||
};
|
||||
|
||||
struct wlr_output_group_child {
|
||||
struct wlr_output *output;
|
||||
struct wlr_output_group *group;
|
||||
struct wlr_fbox src_box;
|
||||
struct wlr_box dst_box;
|
||||
struct wlr_output_group_tile_info tile_info;
|
||||
uint32_t index;
|
||||
struct wlr_output_mode *tiled_mode;
|
||||
struct wl_listener present;
|
||||
struct wl_listener frame;
|
||||
struct wl_listener needs_frame;
|
||||
struct wl_listener output_destroy;
|
||||
struct wl_list link;
|
||||
};
|
||||
|
||||
struct wlr_output_group {
|
||||
struct wlr_output output;
|
||||
/* private data below */
|
||||
int queued_frame_count;
|
||||
int num_children;
|
||||
struct wlr_output_mode *tiled_mode;
|
||||
struct wl_list children; //wlr_output_group_child.link
|
||||
struct wl_list mirrors; //wlr_output_group_child.link
|
||||
struct wlr_drm_format_set cursor_formats;
|
||||
struct wlr_drm_format_set primary_formats;
|
||||
struct wl_event_source *ready;
|
||||
struct wl_list link;
|
||||
struct wlr_backend backend;
|
||||
struct wlr_output_cursor_size *cursor_sizes;
|
||||
size_t cursor_sizes_len;
|
||||
};
|
||||
|
||||
struct wlr_output_group *wlr_output_group_create(void);
|
||||
struct wlr_output_group *wlr_output_group_match_tile(struct wlr_output_group_tile_info *tile_info);
|
||||
void wlr_output_group_add_tile(struct wlr_output_group *group, struct wlr_output *output,
|
||||
struct wlr_output_group_tile_info *tile_info);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue