From 99fd1015d009301f7d32c2115ddc6b6f459c565e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 10 Aug 2012 09:57:56 -0400 Subject: [PATCH] compositor: Drop output->flags All outputs are EGLSurface based so we can drop this detail now. --- src/compositor-android.c | 3 +-- src/compositor-drm.c | 3 +-- src/compositor-wayland.c | 3 +-- src/compositor-x11.c | 3 +-- src/compositor.c | 9 +++------ src/compositor.h | 3 +-- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/compositor-android.c b/src/compositor-android.c index 5233923f..606e3483 100644 --- a/src/compositor-android.c +++ b/src/compositor-android.c @@ -238,8 +238,7 @@ android_compositor_add_output(struct android_compositor *compositor, mm_width = output->fb->width / output->fb->xdpi * 25.4f; mm_height = output->fb->height / output->fb->ydpi * 25.4f; weston_output_init(&output->base, &compositor->base, - 0, 0, round(mm_width), round(mm_height), - WL_OUTPUT_FLIPPED); + 0, 0, round(mm_width), round(mm_height)); wl_list_insert(compositor->base.output_list.prev, &output->base.link); } diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 0c864ef3..7a076106 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1528,8 +1528,7 @@ create_output_for_connector(struct drm_compositor *ec, } weston_output_init(&output->base, &ec->base, x, y, - connector->mmWidth, connector->mmHeight, - WL_OUTPUT_FLIPPED); + connector->mmWidth, connector->mmHeight); wl_list_insert(ec->base.output_list.prev, &output->base.link); diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index ed28b1d7..4810731c 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -391,8 +391,7 @@ wayland_compositor_create_output(struct wayland_compositor *c, wl_list_insert(&output->base.mode_list, &output->mode.link); output->base.current = &output->mode; - weston_output_init(&output->base, &c->base, 0, 0, width, height, - WL_OUTPUT_FLIPPED); + weston_output_init(&output->base, &c->base, 0, 0, width, height); output->base.border.top = c->border.top; output->base.border.bottom = c->border.bottom; diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 0caa8dd0..daa9e156 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -528,8 +528,7 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y, output->base.current = &output->mode; output->base.make = "xwayland"; output->base.model = "none"; - weston_output_init(&output->base, &c->base, x, y, width, height, - WL_OUTPUT_FLIPPED); + weston_output_init(&output->base, &c->base, x, y, width, height); values[1] = c->null_cursor; output->window = xcb_generate_id(c->conn); diff --git a/src/compositor.c b/src/compositor.c index 34df5f7c..54b1f565 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -2975,7 +2975,6 @@ weston_output_destroy(struct weston_output *output) WL_EXPORT void weston_output_update_matrix(struct weston_output *output) { - int flip; float magnification; struct weston_matrix camera; struct weston_matrix modelview; @@ -2985,10 +2984,9 @@ weston_output_update_matrix(struct weston_output *output) -(output->x + (output->border.right + output->current->width - output->border.left) / 2.0), -(output->y + (output->border.bottom + output->current->height - output->border.top) / 2.0), 0); - flip = (output->flags & WL_OUTPUT_FLIPPED) ? -1 : 1; weston_matrix_scale(&output->matrix, 2.0 / (output->current->width + output->border.left + output->border.right), - flip * 2.0 / (output->current->height + output->border.top + output->border.bottom), 1); + -2.0 / (output->current->height + output->border.top + output->border.bottom), 1); if (output->zoom.active) { magnification = 1 / (1 - output->zoom.spring_z.current); @@ -2996,7 +2994,7 @@ weston_output_update_matrix(struct weston_output *output) weston_matrix_init(&modelview); weston_output_update_zoom(output, output->zoom.type); weston_matrix_translate(&camera, output->zoom.trans_x, - flip * output->zoom.trans_y, 0); + -output->zoom.trans_y, 0); weston_matrix_invert(&modelview, &camera); weston_matrix_scale(&modelview, magnification, magnification, 1.0); weston_matrix_multiply(&output->matrix, &modelview); @@ -3019,7 +3017,7 @@ weston_output_move(struct weston_output *output, int x, int y) WL_EXPORT void weston_output_init(struct weston_output *output, struct weston_compositor *c, - int x, int y, int width, int height, uint32_t flags) + int x, int y, int width, int height) { output->compositor = c; output->x = x; @@ -3034,7 +3032,6 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c, weston_output_init_zoom(output); - output->flags = flags; weston_output_move(output, x, y); weston_output_damage(output); diff --git a/src/compositor.h b/src/compositor.h index 47301faa..85877ebd 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -158,7 +158,6 @@ struct weston_output { struct weston_border border; pixman_region32_t region; pixman_region32_t previous_damage; - uint32_t flags; int repaint_needed; int repaint_scheduled; struct weston_output_zoom zoom; @@ -682,7 +681,7 @@ void weston_output_move(struct weston_output *output, int x, int y); void weston_output_init(struct weston_output *output, struct weston_compositor *c, - int x, int y, int width, int height, uint32_t flags); + int x, int y, int width, int height); void weston_output_destroy(struct weston_output *output);