compositor: Drop output->flags
All outputs are EGLSurface based so we can drop this detail now.
This commit is contained in:
parent
8a01580f17
commit
99fd1015d0
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user