Index: uspace/srv/hid/display/display.c
===================================================================
--- uspace/srv/hid/display/display.c	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/display.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -36,4 +36,5 @@
 #include <disp_srv.h>
 #include <errno.h>
+#include <gfx/context.h>
 #include <io/log.h>
 #include <stdlib.h>
@@ -85,8 +86,9 @@
 /** Create display.
  *
+ * @param gc Graphics context for displaying output
  * @param rdisp Place to store pointer to new display.
  * @return EOK on success, ENOMEM if out of memory
  */
-errno_t ds_display_create(ds_display_t **rdisp)
+errno_t ds_display_create(gfx_context_t *gc, ds_display_t **rdisp)
 {
 	ds_display_t *disp;
@@ -98,4 +100,5 @@
 	list_initialize(&disp->windows);
 	disp->next_wnd_id = 1;
+	disp->gc = gc;
 	*rdisp = disp;
 	return EOK;
Index: uspace/srv/hid/display/display.h
===================================================================
--- uspace/srv/hid/display/display.h	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/display.h	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup inet
+/** @addtogroup display
  * @{
  */
@@ -40,4 +40,5 @@
 #include <disp_srv.h>
 #include <errno.h>
+#include <gfx/context.h>
 #include "types/display/display.h"
 #include "types/display/window.h"
@@ -45,5 +46,5 @@
 extern display_ops_t display_srv_ops;
 
-extern errno_t ds_display_create(ds_display_t **);
+extern errno_t ds_display_create(gfx_context_t *, ds_display_t **);
 extern void ds_display_destroy(ds_display_t *);
 extern errno_t ds_display_add_window(ds_display_t *, ds_window_t *);
Index: uspace/srv/hid/display/main.c
===================================================================
--- uspace/srv/hid/display/main.c	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/main.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -7,5 +7,5 @@
  * are met:
  *
- * - Redistributions of source code must retain the above copyright
+ * - Redistribution1s of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright
@@ -46,4 +46,5 @@
 #include <task.h>
 #include "display.h"
+#include "output.h"
 #include "window.h"
 
@@ -56,7 +57,12 @@
 {
 	ds_display_t *disp = NULL;
+	gfx_context_t *gc = NULL;
 	errno_t rc;
 
-	rc = ds_display_create(&disp);
+	rc = output_init(&gc);
+	if (rc != EOK)
+		goto error;
+
+	rc = ds_display_create(gc, &disp);
 	if (rc != EOK)
 		goto error;
@@ -82,4 +88,6 @@
 	return EOK;
 error:
+	if (gc != NULL)
+		gfx_context_delete(gc);
 	if (disp != NULL)
 		ds_display_destroy(disp);
Index: uspace/srv/hid/display/meson.build
===================================================================
--- uspace/srv/hid/display/meson.build	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/meson.build	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -32,4 +32,5 @@
 	'display.c',
 	'main.c',
+	'output.c',
 	'window.c',
 )
Index: uspace/srv/hid/display/output.c
===================================================================
--- uspace/srv/hid/display/output.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
+++ uspace/srv/hid/display/output.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup display
+ * @{
+ */
+/**
+ * @file Display server output
+ */
+
+#include <errno.h>
+#include <gfx/context.h>
+#include <guigfx/canvas.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <window.h>
+#include "output.h"
+
+errno_t output_init(gfx_context_t **rgc)
+{
+	canvas_gc_t *cgc = NULL;
+	window_t *window = NULL;
+	pixel_t *pixbuf = NULL;
+	surface_t *surface = NULL;
+	canvas_t *canvas = NULL;
+	int vw, vh;
+	errno_t rc;
+
+	printf("Init canvas..\n");
+
+	window = window_open("comp:0/winreg", NULL,
+	    WINDOW_MAIN | WINDOW_DECORATED, "Display Server");
+	if (window == NULL) {
+		printf("Error creating window.\n");
+		return -1;
+	}
+
+	vw = 400;
+	vh = 300;
+
+	pixbuf = calloc(vw * vh, sizeof(pixel_t));
+	if (pixbuf == NULL) {
+		printf("Error allocating memory for pixel buffer.\n");
+		return ENOMEM;
+	}
+
+	surface = surface_create(vw, vh, pixbuf, 0);
+	if (surface == NULL) {
+		printf("Error creating surface.\n");
+		return EIO;
+	}
+
+	canvas = create_canvas(window_root(window), NULL, vw, vh,
+	    surface);
+	if (canvas == NULL) {
+		printf("Error creating canvas.\n");
+		return EIO;
+	}
+
+	window_resize(window, 0, 0, vw + 10, vh + 30, WINDOW_PLACEMENT_ANY);
+	window_exec(window);
+
+	printf("Create canvas GC\n");
+	rc = canvas_gc_create(canvas, surface, &cgc);
+	if (rc != EOK)
+		return rc;
+
+	*rgc = canvas_gc_get_ctx(cgc);
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/srv/hid/display/output.h
===================================================================
--- uspace/srv/hid/display/output.h	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
+++ uspace/srv/hid/display/output.h	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup display
+ * @{
+ */
+/**
+ * @file Display server output
+ */
+
+#ifndef OUTPUT_H
+#define OUTPUT_H
+
+#include <gfx/context.h>
+
+extern errno_t output_init(gfx_context_t **);
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/hid/display/test/display.c
===================================================================
--- uspace/srv/hid/display/test/display.c	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/test/display.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -45,5 +45,5 @@
 	errno_t rc;
 
-	rc = ds_display_create(&disp);
+	rc = ds_display_create(NULL, &disp);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -59,5 +59,5 @@
 	errno_t rc;
 
-	rc = ds_display_create(&disp);
+	rc = ds_display_create(NULL, &disp);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
Index: uspace/srv/hid/display/test/window.c
===================================================================
--- uspace/srv/hid/display/test/window.c	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/test/window.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -47,5 +47,5 @@
 	errno_t rc;
 
-	rc = ds_display_create(&disp);
+	rc = ds_display_create(NULL, &disp);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
Index: uspace/srv/hid/display/types/display/display.h
===================================================================
--- uspace/srv/hid/display/types/display/display.h	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/types/display/display.h	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -38,4 +38,5 @@
 
 #include <adt/list.h>
+#include <gfx/context.h>
 #include "window.h"
 
@@ -45,4 +46,6 @@
 	/** Next ID to assign to a window */
 	ds_wnd_id_t next_wnd_id;
+	/** Output GC */
+	gfx_context_t *gc;
 } ds_display_t;
 
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision bef51cf393627fd60142c6b98424b35660187cd1)
+++ uspace/srv/hid/display/window.c	(revision 159776f796896afa6b2824920bfa93d489d87e6a)
@@ -65,7 +65,6 @@
 	ds_window_t *wnd = (ds_window_t *) arg;
 
-	(void) wnd;
 	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_set_color");
-	return EOK;
+	return gfx_set_color(wnd->display->gc, color);
 }
 
@@ -81,7 +80,6 @@
 	ds_window_t *wnd = (ds_window_t *) arg;
 
-	(void) wnd;
 	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_fill_rect");
-	return EOK;
+	return gfx_fill_rect(wnd->display->gc, rect);
 }
 
