mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-04 01:41:18 -05:00
backend/drm: generalize color transform handling
This commit is contained in:
parent
f9a27c5b6f
commit
2984b011b6
7 changed files with 194 additions and 15 deletions
23
include/backend/drm/color.h
Normal file
23
include/backend/drm/color.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef BACKEND_DRN_COLOR_H
|
||||
#define BACKEND_DRN_COLOR_H
|
||||
|
||||
#include <wlr/util/addon.h>
|
||||
|
||||
struct wlr_drm_backend;
|
||||
struct wlr_drm_crtc;
|
||||
struct wlr_color_transform;
|
||||
|
||||
struct wlr_drm_crtc_color_transform {
|
||||
struct wlr_color_transform *base;
|
||||
struct wlr_addon addon; // wlr_color_transform.addons
|
||||
bool failed;
|
||||
struct wlr_color_transform_lut_3x1d *lut_3x1d;
|
||||
};
|
||||
|
||||
struct wlr_drm_crtc_color_transform *drm_crtc_color_transform_import(
|
||||
struct wlr_drm_backend *backend, struct wlr_drm_crtc *crtc,
|
||||
struct wlr_color_transform *base);
|
||||
|
||||
void drm_crtc_color_transform_unref(struct wlr_drm_crtc_color_transform *tr);
|
||||
|
||||
#endif
|
||||
|
|
@ -15,6 +15,8 @@
|
|||
#include "backend/drm/properties.h"
|
||||
#include "backend/drm/renderer.h"
|
||||
|
||||
struct wlr_drm_crtc_color_transform;
|
||||
|
||||
struct wlr_drm_viewport {
|
||||
struct wlr_fbox src_box;
|
||||
struct wlr_box dst_box;
|
||||
|
|
@ -152,6 +154,8 @@ struct wlr_drm_connector_state {
|
|||
struct wlr_drm_syncobj_timeline *wait_timeline;
|
||||
uint64_t wait_point;
|
||||
|
||||
struct wlr_drm_crtc_color_transform *crtc_color_transform;
|
||||
|
||||
// used by atomic
|
||||
uint32_t mode_id;
|
||||
uint32_t gamma_lut;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue