Index: uspace/app/gfxdemo/meson.build
===================================================================
--- uspace/app/gfxdemo/meson.build	(revision a3f63ac154a8851b99a2cdc01fb73050f4b9ca43)
+++ uspace/app/gfxdemo/meson.build	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -27,5 +27,5 @@
 #
 
-deps = [ 'gfx', 'guigfx', 'congfx' ]
+deps = [ 'gfx', 'guigfx', 'congfx', 'ipcgfx' ]
 src = files(
 	'gfxdemo.c',
Index: uspace/lib/ipcgfx/doc/doxygroups.h
===================================================================
--- uspace/lib/ipcgfx/doc/doxygroups.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/doc/doxygroups.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,3 @@
+/** @addtogroup libcongfx libcongfx
+ * @ingroup libs
+ */
Index: uspace/lib/ipcgfx/include/ipcgfx/client.h
===================================================================
--- uspace/lib/ipcgfx/include/ipcgfx/client.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/include/ipcgfx/client.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,53 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/**
+ * @file GFX IPC backend
+ */
+
+#ifndef _IPCGFX_CLIENT_H
+#define _IPCGFX_CLIENT_H
+
+#include <async.h>
+#include <types/ipcgfx/client.h>
+#include <types/gfx/context.h>
+#include <types/gfx/ops/context.h>
+
+extern gfx_context_ops_t ipc_gc_ops;
+
+extern errno_t ipc_gc_create(async_sess_t *, ipc_gc_t **);
+extern errno_t ipc_gc_delete(ipc_gc_t *);
+extern gfx_context_t *ipc_gc_get_ctx(ipc_gc_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ipcgfx/include/ipcgfx/ipc/gc.h
===================================================================
--- uspace/lib/ipcgfx/include/ipcgfx/ipc/gc.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/include/ipcgfx/ipc/gc.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,48 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/** @file
+ */
+
+#ifndef _IPCGFX_IPC_GC_H_
+#define _IPCGFX_IPC_GC_H_
+
+#include <ipc/common.h>
+
+typedef enum {
+	GC_SET_RGB_COLOR = IPC_FIRST_USER_METHOD,
+	GC_FILL_RECT
+} gc_request_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ipcgfx/include/ipcgfx/server.h
===================================================================
--- uspace/lib/ipcgfx/include/ipcgfx/server.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/include/ipcgfx/server.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,48 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/**
+ * @file GFX IPC server
+ */
+
+#ifndef _IPCGFX_SERVER_H
+#define _IPCGFX_SERVER_H
+
+#include <async.h>
+#include <errno.h>
+#include <gfx/context.h>
+
+extern errno_t gc_conn(ipc_call_t *icall, gfx_context_t *gc)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ipcgfx/include/types/ipcgfx/client.h
===================================================================
--- uspace/lib/ipcgfx/include/types/ipcgfx/client.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/include/types/ipcgfx/client.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,45 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/**
+ * @file GFX IPC backend
+ */
+
+#ifndef _IPCGFX_TYPES_CLIENT_H
+#define _IPCGFX_TYPES_CLIENT_H
+
+struct ipc_gc;
+typedef struct ipc_gc ipc_gc_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ipcgfx/meson.build
===================================================================
--- uspace/lib/ipcgfx/meson.build	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/meson.build	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+deps = [ 'gfx' ]
+src = files(
+	'src/client.c',
+	'src/server.c'
+)
Index: uspace/lib/ipcgfx/private/client.h
===================================================================
--- uspace/lib/ipcgfx/private/client.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/private/client.h	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,57 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/**
+ * @file GFX console backend structure
+ *
+ */
+
+#ifndef _IPCGFX_PRIVATE_CLIENT_H
+#define _IPCGFX_PRIVATE_CLIENT_H
+
+#include <async.h>
+#include <gfx/context.h>
+
+/** Actual structure of graphics context.
+ *
+ * This is private to libcongfx. It is not visible to clients nor backends.
+ */
+struct ipc_gc {
+	/** Base graphic context */
+	gfx_context_t *gc;
+	/** Session with GFX server */
+	async_sess_t *sess;
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ipcgfx/src/client.c
===================================================================
--- uspace/lib/ipcgfx/src/client.c	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/src/client.c	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,162 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/**
+ * @file GFX IPC backend
+ *
+ * This implements a graphics context via HelenOS IPC.
+ */
+
+#include <ipcgfx/client.h>
+#include <ipcgfx/ipc/gc.h>
+#include <gfx/color.h>
+#include <gfx/context.h>
+#include <stdlib.h>
+#include "../private/client.h"
+
+static errno_t ipc_gc_set_color(void *, gfx_color_t *);
+static errno_t ipc_gc_fill_rect(void *, gfx_rect_t *);
+
+gfx_context_ops_t ipc_gc_ops = {
+	.set_color = ipc_gc_set_color,
+	.fill_rect = ipc_gc_fill_rect
+};
+
+/** Set color on IPC GC.
+ *
+ * Set drawing color on IPC GC.
+ *
+ * @param arg IPC GC
+ * @param color Color
+ *
+ * @return EOK on success or an error code
+ */
+static errno_t ipc_gc_set_color(void *arg, gfx_color_t *color)
+{
+	ipc_gc_t *ipcgc = (ipc_gc_t *) arg;
+	async_exch_t *exch;
+	uint16_t r, g, b;
+	errno_t rc;
+
+	gfx_color_get_rgb_i16(color, &r, &g, &b);
+
+	exch = async_exchange_begin(ipcgc->sess);
+	rc = async_req_3_0(exch, GC_SET_RGB_COLOR, r, g, b);
+	async_exchange_end(exch);
+
+	return rc;
+}
+
+/** Fill rectangle on IPC GC.
+ *
+ * @param arg IPC GC
+ * @param rect Rectangle
+ *
+ * @return EOK on success or an error code
+ */
+static errno_t ipc_gc_fill_rect(void *arg, gfx_rect_t *rect)
+{
+	ipc_gc_t *ipcgc = (ipc_gc_t *) arg;
+	async_exch_t *exch;
+	errno_t rc;
+
+	exch = async_exchange_begin(ipcgc->sess);
+	rc = async_req_4_0(exch, GC_FILL_RECT, rect->p0.x, rect->p0.y,
+	    rect->p1.x, rect->p1.y);
+	async_exchange_end(exch);
+
+	return rc;
+}
+
+/** Create IPC GC.
+ *
+ * Create graphics context for rendering via IPC.
+ *
+ * @param sess Async session
+ * @param rgc Place to store pointer to new GC.
+ *
+ * @return EOK on success or an error code
+ */
+errno_t ipc_gc_create(async_sess_t *sess, ipc_gc_t **rgc)
+{
+	ipc_gc_t *ipcgc = NULL;
+	gfx_context_t *gc = NULL;
+	errno_t rc;
+
+	ipcgc = calloc(1, sizeof(ipc_gc_t));
+	if (ipcgc == NULL) {
+		rc = ENOMEM;
+		goto error;
+	}
+
+	rc = gfx_context_new(&ipc_gc_ops, ipcgc, &gc);
+	if (rc != EOK)
+		goto error;
+
+	ipcgc->gc = gc;
+	ipcgc->sess = sess;
+	*rgc = ipcgc;
+	return EOK;
+error:
+	if (ipcgc != NULL)
+		free(ipcgc);
+	gfx_context_delete(gc);
+	return rc;
+}
+
+/** Delete IPC GC.
+ *
+ * @param ipcgc IPC GC
+ */
+errno_t ipc_gc_delete(ipc_gc_t *ipcgc)
+{
+	errno_t rc;
+
+	rc = gfx_context_delete(ipcgc->gc);
+	if (rc != EOK)
+		return rc;
+
+	free(ipcgc);
+	return EOK;
+}
+
+/** Get generic graphic context from IPC GC.
+ *
+ * @param ipcgc IPC GC
+ * @return Graphic context
+ */
+gfx_context_t *ipc_gc_get_ctx(ipc_gc_t *ipcgc)
+{
+	return ipcgc->gc;
+}
+
+/** @}
+ */
Index: uspace/lib/ipcgfx/src/server.c
===================================================================
--- uspace/lib/ipcgfx/src/server.c	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/lib/ipcgfx/src/server.c	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -0,0 +1,114 @@
+/*
+ * 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 libipcgfx
+ * @{
+ */
+/**
+ * @file GFX IPC server
+ *
+ * Serve a graphics context via HelenOS IPC.
+ */
+
+#include <errno.h>
+#include <gfx/color.h>
+#include <gfx/render.h>
+#include <ipc/bd.h>
+#include <ipcgfx/ipc/gc.h>
+#include <ipcgfx/server.h>
+#include <stdint.h>
+
+#include <bd_srv.h>
+
+static void gc_set_rgb_color_srv(gfx_context_t *gc, ipc_call_t *call)
+{
+	uint16_t r, g, b;
+	gfx_color_t *color;
+	errno_t rc;
+
+	r = ipc_get_arg1(call);
+	g = ipc_get_arg2(call);
+	b = ipc_get_arg3(call);
+
+	rc = gfx_color_new_rgb_i16(r, g, b, &color);
+	if (rc != EOK) {
+		async_answer_0(call, ENOMEM);
+		return;
+	}
+
+	rc = gfx_set_color(gc, color);
+	async_answer_0(call, rc);
+}
+
+static void gc_fill_rect_srv(gfx_context_t *gc, ipc_call_t *call)
+{
+	gfx_rect_t rect;
+	errno_t rc;
+
+	rect.p0.x = ipc_get_arg1(call);
+	rect.p0.y = ipc_get_arg2(call);
+	rect.p1.x = ipc_get_arg3(call);
+	rect.p1.y = ipc_get_arg4(call);
+
+	rc = gfx_fill_rect(gc, &rect);
+	async_answer_0(call, rc);
+}
+
+errno_t gc_conn(ipc_call_t *icall, gfx_context_t *gc)
+{
+	/* Accept the connection */
+	async_accept_0(icall);
+
+	while (true) {
+		ipc_call_t call;
+		async_get_call(&call);
+		sysarg_t method = ipc_get_imethod(&call);
+
+		if (!method) {
+			/* The other side has hung up */
+			async_answer_0(&call, EOK);
+			break;
+		}
+
+		switch (method) {
+		case GC_SET_RGB_COLOR:
+			gc_set_rgb_color_srv(gc, &call);
+			break;
+		case GC_FILL_RECT:
+			gc_fill_rect_srv(gc, &call);
+			break;
+		default:
+			async_answer_0(&call, EINVAL);
+		}
+	}
+
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/lib/meson.build
===================================================================
--- uspace/lib/meson.build	(revision a3f63ac154a8851b99a2cdc01fb73050f4b9ca43)
+++ uspace/lib/meson.build	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
@@ -86,4 +86,5 @@
 	'guigfx',
 	'ieee80211',
+	'ipcgfx'
 ]
 
