[mutter/wip/garnacho/wayland-emulated-output-transform: 12/13] backends/native: Expose all transform modes in CRTCs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/garnacho/wayland-emulated-output-transform: 12/13] backends/native: Expose all transform modes in CRTCs
- Date: Mon, 1 Aug 2016 11:36:24 +0000 (UTC)
commit ec456d630685dd989cf9d06772656c7c7eb7b724
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 1 03:51:36 2016 +0200
backends/native: Expose all transform modes in CRTCs
We can only honor this properly in the MUTTER_STAGE_VIEWS=1 case. When using
the legacy view, software implemented transforms are only exposed if there is
only one output, as we can only transform the entire stage there.
src/backends/native/meta-monitor-manager-kms.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
index 2c30bbe..922b4c9 100644
--- a/src/backends/native/meta-monitor-manager-kms.c
+++ b/src/backends/native/meta-monitor-manager-kms.c
@@ -46,6 +46,7 @@
#include <gudev/gudev.h>
#define ALL_TRANSFORMS (META_MONITOR_TRANSFORM_FLIPPED_270 + 1)
+#define ALL_TRANSFORMS_MASK ((1 << ALL_TRANSFORMS) - 1)
typedef struct {
drmModeConnector *connector;
@@ -687,8 +688,7 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
meta_crtc->rect.height = crtc->height;
meta_crtc->is_dirty = FALSE;
meta_crtc->transform = META_MONITOR_TRANSFORM_NORMAL;
- /* FIXME: implement! */
- meta_crtc->all_transforms = 1 << META_MONITOR_TRANSFORM_NORMAL;
+ meta_crtc->all_transforms = ALL_TRANSFORMS_MASK;
if (crtc->mode_valid)
{
@@ -952,6 +952,13 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
MetaCRTC *meta_crtc = &manager->crtcs[i];
MetaCRTCKms *crtc_kms = meta_crtc->driver_private;
+ /* If we have no stage views, we only allow sw rotation
+ * if there is only one output, thus the whole stage
+ * can be rotated.
+ */
+ if (!meta_is_stage_views_enabled () && manager->n_outputs > 1)
+ meta_crtc->all_transforms = META_MONITOR_TRANSFORM_NORMAL;
+
meta_crtc->all_transforms |= crtc_kms->all_hw_transforms;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]