Set needs_swap on output when gamma changes
This commit is contained in:
parent
f5e5d1983b
commit
2df97ed16a
|
@ -232,12 +232,17 @@ static void wlr_drm_connector_set_gamma(struct wlr_output *output,
|
||||||
uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b) {
|
uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b) {
|
||||||
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
||||||
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
|
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
|
||||||
|
bool ok;
|
||||||
|
|
||||||
if (conn->crtc) {
|
if (conn->crtc) {
|
||||||
drm->iface->crtc_set_gamma(drm, conn->crtc, r, g, b, size);
|
ok = drm->iface->crtc_set_gamma(drm, conn->crtc, r, g, b, size);
|
||||||
|
if (ok) {
|
||||||
|
wlr_output_update_needs_swap(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static uint32_t wlr_drm_connector_get_gamma_size(struct wlr_output *output) {
|
static uint32_t wlr_drm_connector_get_gamma_size(struct wlr_output *output) {
|
||||||
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
||||||
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
|
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
|
||||||
|
|
Loading…
Reference in New Issue