mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
egl-gdl: Provide defaults to be able to initialize a "dummy" context
If we are being called without any GDL specific call (either the plane we want to render to or the swap chain length) we can provide sane defaults to still be able to create a context and a surface. https://bugzilla.gnome.org/show_bug.cgi?id=655355
This commit is contained in:
parent
303305173b
commit
2c3827aced
@ -97,6 +97,10 @@ cogl_display_new (CoglRenderer *renderer,
|
||||
|
||||
display->setup = FALSE;
|
||||
|
||||
#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT
|
||||
display->gdl_plane = GDL_PLANE_ID_UPP_C;
|
||||
#endif
|
||||
|
||||
return _cogl_display_object_new (display);
|
||||
}
|
||||
|
||||
|
@ -1091,9 +1091,13 @@ gdl_plane_init (CoglDisplay *display, GError **error)
|
||||
if (rc == GDL_SUCCESS)
|
||||
rc = gdl_plane_set_attr (GDL_PLANE_DST_RECT, &dstRect);
|
||||
|
||||
/* Default to triple buffering if we don't have an onscreen template */
|
||||
if (rc == GDL_SUCCESS)
|
||||
rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES,
|
||||
display->swap_chain->length);
|
||||
if (display->onscreen_template)
|
||||
rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES,
|
||||
display->onscreen_template->swap_chain->length);
|
||||
else
|
||||
rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES, 3);
|
||||
|
||||
if (rc == GDL_SUCCESS)
|
||||
rc = gdl_plane_config_end (GDL_FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user