[PATCH V2 2/8] weston: Add the weston randr support in compositor.h
Quanxian Wang
quanxian.wang at intel.com
Mon Mar 24 04:39:14 PDT 2014
1) Add weston_randr definition and randr_backend intreface.
2) Export functions used in compositor.c so that module wrandr
could use them. For example, weston_output_transform_scale_init.
3) Support new_mode backend interface in output structure.
Signed-off-by: Quanxian Wang <quanxian.wang at intel.com>
---
src/compositor.h | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/compositor.h b/src/compositor.h
index 22a485f..19d0f7b 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -172,6 +172,17 @@ enum weston_mode_switch_op {
WESTON_MODE_SWITCH_RESTORE_NATIVE
};
+struct wrandr {
+ struct weston_compositor *compositor;
+ struct wl_global *global;
+ struct wl_resource *resource;
+ struct wl_listener destroy_listener;
+ struct {
+ struct wl_list request_list;
+ struct wl_list randr_callback_list;
+ } pending;
+};
+
struct weston_output {
uint32_t id;
char *name;
@@ -218,6 +229,18 @@ struct weston_output {
void (*destroy)(struct weston_output *output);
void (*assign_planes)(struct weston_output *output);
int (*switch_mode)(struct weston_output *output, struct weston_mode *mode);
+ struct weston_mode * (*new_mode)(struct weston_output *output,
+ int fclock,
+ int hdisplay,
+ int hsync_start,
+ int hsync_end,
+ int htotal,
+ int vdisplay,
+ int vsync_start,
+ int vsync_end,
+ int vtotal,
+ const char *hsync,
+ const char *vsync);
/* backlight values are on 0-255 range, where higher is brighter */
int32_t backlight_current;
@@ -632,6 +655,7 @@ struct weston_compositor {
/* Raw keyboard processing (no libxkbcommon initialization or handling) */
int use_xkbcommon;
+ struct wrandr *randr;
};
struct weston_buffer {
@@ -1356,6 +1380,10 @@ weston_surface_set_color(struct weston_surface *surface,
void
weston_surface_destroy(struct weston_surface *surface);
+void
+weston_output_transform_scale_init(struct weston_output *output,
+ uint32_t transform, uint32_t scale);
+
int
weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode,
int32_t scale, enum weston_mode_switch_op op);
--
1.8.1.2
More information about the wayland-devel
mailing list