mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-15 14:33:01 -04:00
Merge branch 'brightness' into 'master'
Add brightness support See merge request wlroots/wlroots!5384
This commit is contained in:
commit
5e94bd284e
11 changed files with 129 additions and 4 deletions
|
|
@ -164,6 +164,7 @@ struct wlr_drm_connector_state {
|
|||
bool vrr_enabled;
|
||||
uint32_t colorspace;
|
||||
uint32_t hdr_output_metadata;
|
||||
uint64_t luminance;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -199,6 +200,7 @@ struct wlr_drm_connector {
|
|||
drmModeConnection status;
|
||||
uint32_t id;
|
||||
uint64_t max_bpc_bounds[2];
|
||||
uint64_t luminance_bounds[2];
|
||||
struct wlr_drm_lease *lease;
|
||||
|
||||
struct wlr_drm_crtc *crtc;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ struct wlr_drm_connector_props {
|
|||
uint32_t crtc_id;
|
||||
uint32_t colorspace;
|
||||
uint32_t hdr_output_metadata;
|
||||
uint32_t luminance;
|
||||
};
|
||||
|
||||
struct wlr_drm_crtc_props {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ enum wlr_output_state_field {
|
|||
WLR_OUTPUT_STATE_COLOR_TRANSFORM = 1 << 12,
|
||||
WLR_OUTPUT_STATE_IMAGE_DESCRIPTION = 1 << 13,
|
||||
WLR_OUTPUT_STATE_COLOR_REPRESENTATION = 1 << 14,
|
||||
WLR_OUTPUT_STATE_BRIGHTNESS = 1 << 15,
|
||||
};
|
||||
|
||||
enum wlr_output_state_mode_type {
|
||||
|
|
@ -165,6 +166,8 @@ struct wlr_output_state {
|
|||
struct wlr_color_transform *color_transform;
|
||||
|
||||
struct wlr_output_image_description *image_description;
|
||||
|
||||
float brightness;
|
||||
};
|
||||
|
||||
struct wlr_output_impl;
|
||||
|
|
@ -213,11 +216,14 @@ struct wlr_output {
|
|||
enum wlr_color_encoding color_encoding;
|
||||
enum wlr_color_range color_range;
|
||||
const struct wlr_output_image_description *image_description;
|
||||
float brightness;
|
||||
|
||||
// Indicates whether making changes to adaptive sync status is supported.
|
||||
// If false, changes to adaptive sync status is guaranteed to fail. If
|
||||
// true, changes may either succeed or fail.
|
||||
bool adaptive_sync_supported;
|
||||
// Indicates whether brightness changes are supported.
|
||||
bool brightness_supported;
|
||||
|
||||
bool needs_frame;
|
||||
// damage for cursors and fullscreen surface, in output-local coordinates
|
||||
|
|
@ -632,6 +638,8 @@ void wlr_output_state_set_color_transform(struct wlr_output_state *state,
|
|||
bool wlr_output_state_set_image_description(struct wlr_output_state *state,
|
||||
const struct wlr_output_image_description *image_desc);
|
||||
|
||||
void wlr_output_state_set_brightness(struct wlr_output_state *state, float value);
|
||||
|
||||
/**
|
||||
* Set the color encoding and range of the primary scanout buffer.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ struct wlr_output_power_manager_v1 {
|
|||
|
||||
struct {
|
||||
struct wl_signal set_mode; // struct wlr_output_power_v1_set_mode_event
|
||||
struct wl_signal set_brightness; // struct wlr_output_power_v1_set_brightness_event
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
|
|
@ -39,6 +40,11 @@ struct wlr_output_power_v1_set_mode_event {
|
|||
enum zwlr_output_power_v1_mode mode;
|
||||
};
|
||||
|
||||
struct wlr_output_power_v1_set_brightness_event {
|
||||
struct wlr_output *output;
|
||||
float value;
|
||||
};
|
||||
|
||||
struct wlr_output_power_manager_v1 *wlr_output_power_manager_v1_create(
|
||||
struct wl_display *display);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue