backend-drm: Use resize_output to allow changing the fb
A video mode change would be needed to change the underlying renderer framebuffer. All other backends make uses of this so let's do it for the DRM-backend as well. This would also be needed for the output capture to function properly as we need call weston_output_update_capture_info() when a new mode set has set. Otherwise we'd run into mismatched dimensions for the current mode versus the dimensions set-up initially in weston_output_capture_source_info. Signed-off-by: marius vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
17e4a77831
commit
3044d8ed72
|
@ -930,6 +930,7 @@ drm_output_apply_mode(struct drm_output *output)
|
|||
{
|
||||
struct drm_device *device = output->device;
|
||||
struct drm_backend *b = device->backend;
|
||||
struct weston_size fb_size;
|
||||
|
||||
/* XXX: This drops our current buffer too early, before we've started
|
||||
* displaying it. Ideally this should be much more atomic and
|
||||
|
@ -939,6 +940,11 @@ drm_output_apply_mode(struct drm_output *output)
|
|||
*/
|
||||
device->state_invalid = true;
|
||||
|
||||
fb_size.width = output->base.current_mode->width;
|
||||
fb_size.height = output->base.current_mode->height;
|
||||
|
||||
weston_renderer_resize_output(&output->base, &fb_size, NULL);
|
||||
|
||||
if (b->compositor->renderer->type == WESTON_RENDERER_PIXMAN) {
|
||||
drm_output_fini_pixman(output);
|
||||
if (drm_output_init_pixman(output, b) < 0) {
|
||||
|
|
Loading…
Reference in New Issue