mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
compositor: Initiate cogl context field on creation
There will only ever be one context; just get it from clutter instead of waiting for we interact with a framebuffer. https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
parent
767e12125b
commit
a465e4c5b8
@ -138,4 +138,6 @@ gboolean meta_backend_get_relative_motion_deltas (MetaBackend *backend,
|
||||
void meta_backend_set_client_pointer_constraint (MetaBackend *backend,
|
||||
MetaPointerConstraint *constraint);
|
||||
|
||||
ClutterBackend * meta_backend_get_clutter_backend (MetaBackend *backend);
|
||||
|
||||
#endif /* META_BACKEND_PRIVATE_H */
|
||||
|
@ -671,7 +671,7 @@ static GSourceFuncs event_funcs = {
|
||||
event_dispatch
|
||||
};
|
||||
|
||||
static ClutterBackend *
|
||||
ClutterBackend *
|
||||
meta_backend_get_clutter_backend (MetaBackend *backend)
|
||||
{
|
||||
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
|
@ -1051,7 +1051,6 @@ meta_pre_paint_func (gpointer data)
|
||||
frame_callback,
|
||||
compositor,
|
||||
NULL);
|
||||
compositor->context = cogl_framebuffer_get_context (COGL_FRAMEBUFFER (compositor->onscreen));
|
||||
}
|
||||
|
||||
if (compositor->windows == NULL)
|
||||
@ -1159,10 +1158,13 @@ on_shadow_factory_changed (MetaShadowFactory *factory,
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor;
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||
MetaCompositor *compositor;
|
||||
|
||||
compositor = g_new0 (MetaCompositor, 1);
|
||||
compositor->display = display;
|
||||
compositor->context = clutter_backend->cogl_context;
|
||||
|
||||
if (g_getenv("META_DISABLE_MIPMAPS"))
|
||||
compositor->no_mipmaps = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user