mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 20:44:08 +00:00
compositor-wayland: Move vfunc setting from set_size to enable
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
This commit is contained in:
parent
e31d95f262
commit
f16de17054
|
@ -1088,11 +1088,21 @@ wayland_output_enable(struct weston_output *base)
|
||||||
if (b->use_pixman) {
|
if (b->use_pixman) {
|
||||||
if (wayland_output_init_pixman_renderer(output) < 0)
|
if (wayland_output_init_pixman_renderer(output) < 0)
|
||||||
goto err_output;
|
goto err_output;
|
||||||
|
|
||||||
|
output->base.repaint = wayland_output_repaint_pixman;
|
||||||
} else {
|
} else {
|
||||||
if (wayland_output_init_gl_renderer(output) < 0)
|
if (wayland_output_init_gl_renderer(output) < 0)
|
||||||
goto err_output;
|
goto err_output;
|
||||||
|
|
||||||
|
output->base.repaint = wayland_output_repaint_gl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output->base.start_repaint_loop = wayland_output_start_repaint_loop;
|
||||||
|
output->base.assign_planes = NULL;
|
||||||
|
output->base.set_backlight = NULL;
|
||||||
|
output->base.set_dpms = NULL;
|
||||||
|
output->base.switch_mode = wayland_output_switch_mode;
|
||||||
|
|
||||||
if (b->sprawl_across_outputs) {
|
if (b->sprawl_across_outputs) {
|
||||||
wayland_output_set_fullscreen(output,
|
wayland_output_set_fullscreen(output,
|
||||||
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER,
|
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER,
|
||||||
|
@ -1166,7 +1176,6 @@ static int
|
||||||
wayland_output_set_size(struct weston_output *base, int width, int height)
|
wayland_output_set_size(struct weston_output *base, int width, int height)
|
||||||
{
|
{
|
||||||
struct wayland_output *output = to_wayland_output(base);
|
struct wayland_output *output = to_wayland_output(base);
|
||||||
struct wayland_backend *b = to_wayland_backend(base->compositor);
|
|
||||||
int output_width, output_height;
|
int output_width, output_height;
|
||||||
|
|
||||||
/* We can only be called once. */
|
/* We can only be called once. */
|
||||||
|
@ -1208,17 +1217,6 @@ wayland_output_set_size(struct weston_output *base, int width, int height)
|
||||||
output->base.mm_width = width;
|
output->base.mm_width = width;
|
||||||
output->base.mm_height = height;
|
output->base.mm_height = height;
|
||||||
|
|
||||||
if (b->use_pixman)
|
|
||||||
output->base.repaint = wayland_output_repaint_pixman;
|
|
||||||
else
|
|
||||||
output->base.repaint = wayland_output_repaint_gl;
|
|
||||||
|
|
||||||
output->base.start_repaint_loop = wayland_output_start_repaint_loop;
|
|
||||||
output->base.assign_planes = NULL;
|
|
||||||
output->base.set_backlight = NULL;
|
|
||||||
output->base.set_dpms = NULL;
|
|
||||||
output->base.switch_mode = wayland_output_switch_mode;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue