diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2014-11-04 10:47:33 -0600 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-11-05 13:15:13 +0200 |
commit | 6ae7bc982fa9d70f3206713f05f354bbfac59fb5 (patch) | |
tree | 772c9564d4a82e0e2cb8932816472ae0c0336a9d /fullscreen-shell | |
parent | 61a9bf5557b7924b710bd561b30f6b27401f9461 (diff) | |
download | weston-6ae7bc982fa9d70f3206713f05f354bbfac59fb5.tar.gz |
compositor: Refactor weston_output_mode_switch()
This breaks weston_output_mode_switch() into 3 functions:
weston_output_mode_set_native()
weston_output_mode_switch_to_temporary()
weston_output_mode_switch_to_native()
Differences from previous behaviour:
SET_NATIVE didn't set current_scale (now it does)
SET_TEMPORARY could set mode and scale independently - now it can't.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'fullscreen-shell')
-rw-r--r-- | fullscreen-shell/fullscreen-shell.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c index c7950df9..35e6d8fd 100644 --- a/fullscreen-shell/fullscreen-shell.c +++ b/fullscreen-shell/fullscreen-shell.c @@ -284,12 +284,8 @@ fs_output_for_output(struct weston_output *output) static void restore_output_mode(struct weston_output *output) { - if (output->original_mode || - (int32_t)output->current_scale != output->original_scale) - weston_output_switch_mode(output, - output->native_mode, - output->native_scale, - WESTON_MODE_SWITCH_RESTORE_NATIVE); + if (output->original_mode) + weston_output_mode_switch_to_native(output); } /* @@ -472,9 +468,8 @@ fs_output_configure_for_mode(struct fs_output *fsout, mode.height = surf_height * fsout->output->native_scale; mode.refresh = fsout->pending.framerate; - ret = weston_output_switch_mode(fsout->output, &mode, - fsout->output->native_scale, - WESTON_MODE_SWITCH_SET_TEMPORARY); + ret = weston_output_mode_switch_to_temporary(fsout->output, &mode, + fsout->output->native_scale); if (ret != 0) { /* The mode switch failed. Clear the pending and |