mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
display: always ensure we have an onscreen_template
If the user doesn't explicitly pass an onscreen template then instead of leaving display->onscreen_template as NULL we now instantiate a template ourselves. This simplifies winsys code that might want to refer to the template since it needn't first check for a NULL pointer. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
@ -109,6 +109,8 @@ cogl_display_new (CoglRenderer *renderer,
|
||||
display->onscreen_template = onscreen_template;
|
||||
if (onscreen_template)
|
||||
cogl_object_ref (onscreen_template);
|
||||
else
|
||||
display->onscreen_template = cogl_onscreen_template_new (NULL);
|
||||
|
||||
display->setup = FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user