[PATCH 1/3] compositor: Add an switch_mode hook to the output
zhiwen.wu at linux.intel.com
zhiwen.wu at linux.intel.com
Wed Mar 7 01:01:25 PST 2012
From: Alex Wu <zhiwen.wu at linux.intel.com>
This allow each output back end to switch the display mode. It is
useful to some applications (e.g. fullscreen game, xbmc)
---
src/compositor-drm.c | 1 +
src/compositor-openwfd.c | 1 +
src/compositor-wayland.c | 1 +
src/compositor-x11.c | 1 +
src/compositor.h | 2 ++
5 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 9796014..1b0a9b9 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1140,6 +1140,7 @@ create_output_for_connector(struct drm_compositor *ec,
output->base.destroy = drm_output_destroy;
output->base.assign_planes = drm_assign_planes;
output->base.set_dpms = drm_set_dpms;
+ output->base.switch_mode = NULL;
return 0;
diff --git a/src/compositor-openwfd.c b/src/compositor-openwfd.c
index eae1e66..2727325 100644
--- a/src/compositor-openwfd.c
+++ b/src/compositor-openwfd.c
@@ -409,6 +409,7 @@ create_output_for_port(struct wfd_compositor *ec,
output->base.assign_planes = NULL;
output->base.set_backlight = NULL;
output->base.set_dpms = NULL;
+ output->base.switch_mode = NULL;
wl_list_insert(ec->base.output_list.prev, &output->base.link);
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index f23c357..403771d 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -438,6 +438,7 @@ wayland_compositor_create_output(struct wayland_compositor *c,
output->base.assign_planes = NULL;
output->base.set_backlight = NULL;
output->base.set_dpms = NULL;
+ output->base.switch_mode = NULL;
wl_list_insert(c->base.output_list.prev, &output->base.link);
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index c227063..838880c 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -444,6 +444,7 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
output->base.assign_planes = NULL;
output->base.set_backlight = NULL;
output->base.set_dpms = NULL;
+ output->base.switch_mode = NULL;
wl_list_insert(c->base.output_list.prev, &output->base.link);
diff --git a/src/compositor.h b/src/compositor.h
index b94731b..539b3ba 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -100,6 +100,8 @@ struct weston_output {
uint32_t backlight_current;
void (*set_backlight)(struct weston_output *output, uint32_t value);
void (*set_dpms)(struct weston_output *output, enum dpms_enum level);
+
+ int (*switch_mode)(struct weston_output *output, int32_t w, int32_t h, uint32_t refresh);
};
struct weston_input_device {
--
1.7.5.4
More information about the wayland-devel
mailing list