mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
backends/native: Set transform on MetaRendererViews
Only do this if mutter uses the multiple stage views feature. This is uneffective at the moment because no back texture is set yet. https://bugzilla.gnome.org/show_bug.cgi?id=745079
This commit is contained in:
parent
89854f9244
commit
a72bd1bd29
@ -837,6 +837,22 @@ meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MetaMonitorTransform
|
||||||
|
meta_renderer_native_get_monitor_info_transform (MetaRenderer *renderer,
|
||||||
|
MetaMonitorInfo *monitor_info)
|
||||||
|
{
|
||||||
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
MetaMonitorManager *monitor_manager =
|
||||||
|
meta_backend_get_monitor_manager (backend);
|
||||||
|
MetaMonitorManagerKms *monitor_manager_kms =
|
||||||
|
META_MONITOR_MANAGER_KMS (monitor_manager);
|
||||||
|
|
||||||
|
g_assert (monitor_info->n_outputs > 0);
|
||||||
|
|
||||||
|
return meta_monitor_manager_kms_get_view_transform (monitor_manager_kms,
|
||||||
|
monitor_info->outputs[0]->crtc);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_renderer_native_set_legacy_view_size (MetaRendererNative *renderer_native,
|
meta_renderer_native_set_legacy_view_size (MetaRendererNative *renderer_native,
|
||||||
MetaRendererView *view,
|
MetaRendererView *view,
|
||||||
@ -1039,11 +1055,14 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
|||||||
MetaBackend *backend = meta_get_backend ();
|
MetaBackend *backend = meta_get_backend ();
|
||||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||||
CoglContext *cogl_context = clutter_backend_get_cogl_context (clutter_backend);
|
CoglContext *cogl_context = clutter_backend_get_cogl_context (clutter_backend);
|
||||||
|
MetaMonitorTransform transform;
|
||||||
CoglOnscreen *onscreen;
|
CoglOnscreen *onscreen;
|
||||||
CoglFramebuffer *framebuffer;
|
CoglFramebuffer *framebuffer;
|
||||||
MetaRendererView *view;
|
MetaRendererView *view;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
|
transform = meta_renderer_native_get_monitor_info_transform (renderer,
|
||||||
|
monitor_info);
|
||||||
onscreen = cogl_onscreen_new (cogl_context,
|
onscreen = cogl_onscreen_new (cogl_context,
|
||||||
monitor_info->rect.width,
|
monitor_info->rect.width,
|
||||||
monitor_info->rect.height);
|
monitor_info->rect.height);
|
||||||
@ -1059,6 +1078,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
|||||||
"layout", &monitor_info->rect,
|
"layout", &monitor_info->rect,
|
||||||
"framebuffer", framebuffer,
|
"framebuffer", framebuffer,
|
||||||
"monitor-info", monitor_info,
|
"monitor-info", monitor_info,
|
||||||
|
"transform", transform,
|
||||||
NULL);
|
NULL);
|
||||||
cogl_object_unref (framebuffer);
|
cogl_object_unref (framebuffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user