summaryrefslogtreecommitdiff
path: root/cogl/cogl-renderer.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-01-25 19:29:29 +0000
committerNeil Roberts <neil@linux.intel.com>2012-04-11 15:44:58 +0100
commit125c31a70b5238eb8ab0c59ea8790b196be58dd8 (patch)
tree22d7f8beb92e1628911ab81eab7e3a5a587fef73 /cogl/cogl-renderer.c
parentf9d3ea03ecf5241bf54e46cdff4048891925dfb9 (diff)
downloadcogl-125c31a70b5238eb8ab0c59ea8790b196be58dd8.tar.gz
kms: Add mirror support and env var configurability
This adds support for mirroring the display output on two KMS connectors. This patch also checks for a number of environment variables that can influence how KMS is configured. The following variables can be set: COGL_KMS_MIRROR: If this is set to anything then Cogl will try and setup two connectors with the same resolution so that onscreen frame buffers can be mirrored. COGL_KMS_CONNECTOR0: This can be set to an integer identifier for a specific KMS connector id to use for the first output. COGL_KMS_CONNECTOR0_MODE: Can be set to a mode name like "1024x768" explicitly select what mode should be used for the first output. If COGL_KMS_MIRROR is set then COGL_KMS_CONNECTOR1 and COGL_KMS_CONNECTOR1_MODE can optionally be set to specify a connector id and mode name for the second output. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-renderer.c')
-rw-r--r--cogl/cogl-renderer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c
index d07a3ca4..fea58333 100644
--- a/cogl/cogl-renderer.c
+++ b/cogl/cogl-renderer.c
@@ -142,7 +142,9 @@ static void
_cogl_renderer_free (CoglRenderer *renderer)
{
const CoglWinsysVtable *winsys = _cogl_renderer_get_winsys (renderer);
- winsys->renderer_disconnect (renderer);
+
+ if (winsys)
+ winsys->renderer_disconnect (renderer);
#ifndef HAVE_DIRECTLY_LINKED_GL_LIBRARY
if (renderer->libgl_module)