Index: uspace/lib/ui/src/dummygc.c
===================================================================
--- uspace/lib/ui/src/dummygc.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/src/dummygc.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -43,4 +43,5 @@
 static errno_t dummygc_set_color(void *, gfx_color_t *);
 static errno_t dummygc_fill_rect(void *, gfx_rect_t *);
+static errno_t dummygc_update(void *);
 static errno_t dummygc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -53,4 +54,5 @@
 	.set_color = dummygc_set_color,
 	.fill_rect = dummygc_fill_rect,
+	.update = dummygc_update,
 	.bitmap_create = dummygc_bitmap_create,
 	.bitmap_destroy = dummygc_bitmap_destroy,
@@ -128,4 +130,15 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+/** Update dummy GC
+ *
+ * @param arg Argument (dummy_gc_t)
+ * @return EOK on success or an error code
+ */
+static errno_t dummygc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/checkbox.c
===================================================================
--- uspace/lib/ui/test/checkbox.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/checkbox.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -492,4 +494,10 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/entry.c
===================================================================
--- uspace/lib/ui/test/entry.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/entry.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -220,4 +222,10 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/image.c
===================================================================
--- uspace/lib/ui/test/image.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/image.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -34,4 +34,5 @@
 #include <ui/control.h>
 #include <ui/image.h>
+#include <ui/resource.h>
 #include <ui/ui.h>
 #include "../private/dummygc.h"
@@ -87,10 +88,22 @@
 PCUT_TEST(set_rect)
 {
+	errno_t rc;
+	dummy_gc_t *dgc;
+	gfx_context_t *gc;
+	ui_resource_t *resource = NULL;
 	ui_image_t *image = NULL;
 	gfx_rect_t brect;
 	gfx_rect_t rect;
-	errno_t rc;
-
-	rc = ui_image_create(NULL, NULL, &brect, &image);
+
+	rc = dummygc_create(&dgc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gc = dummygc_get_ctx(dgc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_image_create(resource, NULL, &brect, &image);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(image);
@@ -108,4 +121,6 @@
 
 	ui_image_destroy(image);
+	ui_resource_destroy(resource);
+	dummygc_destroy(dgc);
 }
 
@@ -139,4 +154,5 @@
 	dummy_gc_t *dgc;
 	gfx_context_t *gc;
+	ui_resource_t *resource = NULL;
 	errno_t rc;
 
@@ -146,5 +162,9 @@
 	gc = dummygc_get_ctx(dgc);
 
-	rc = ui_image_create(NULL, NULL, &brect, &image);
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_image_create(resource, NULL, &brect, &image);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(image);
@@ -172,4 +192,6 @@
 
 	ui_image_destroy(image);
+	ui_resource_destroy(resource);
+	dummygc_destroy(dgc);
 }
 
@@ -181,4 +203,5 @@
 	gfx_bitmap_params_t params;
 	gfx_bitmap_t *bitmap;
+	ui_resource_t *resource = NULL;
 	ui_image_t *image = NULL;
 	gfx_rect_t brect;
@@ -189,4 +212,8 @@
 
 	gc = dummygc_get_ctx(dgc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
 
 	gfx_bitmap_params_init(&params);
@@ -194,5 +221,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ui_image_create(NULL, bitmap, &brect, &image);
+	rc = ui_image_create(resource, bitmap, &brect, &image);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(image);
@@ -209,4 +236,6 @@
 
 	ui_image_destroy(image);
+	ui_resource_destroy(resource);
+	dummygc_destroy(dgc);
 }
 
Index: uspace/lib/ui/test/label.c
===================================================================
--- uspace/lib/ui/test/label.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/label.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -220,4 +222,10 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/pbutton.c
===================================================================
--- uspace/lib/ui/test/pbutton.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/pbutton.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -499,4 +501,10 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/rbutton.c
===================================================================
--- uspace/lib/ui/test/rbutton.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/rbutton.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -564,4 +566,10 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/slider.c
===================================================================
--- uspace/lib/ui/test/slider.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/slider.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -439,4 +441,10 @@
 	(void) arg;
 	(void) rect;
+	return EOK;
+}
+
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
 	return EOK;
 }
Index: uspace/lib/ui/test/wdecor.c
===================================================================
--- uspace/lib/ui/test/wdecor.c	(revision 2e1dbf7df50b469ea457f74658c86af46e7a9648)
+++ uspace/lib/ui/test/wdecor.c	(revision e7b32d71046b24ad0ea0dcf9eec7dca6d37518ab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -43,4 +43,5 @@
 static errno_t testgc_set_color(void *, gfx_color_t *);
 static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+static errno_t testgc_update(void *);
 static errno_t testgc_bitmap_create(void *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, void **);
@@ -52,4 +53,5 @@
 	.set_color = testgc_set_color,
 	.fill_rect = testgc_fill_rect,
+	.update = testgc_update,
 	.bitmap_create = testgc_bitmap_create,
 	.bitmap_destroy = testgc_bitmap_destroy,
@@ -354,11 +356,22 @@
 PCUT_TEST(pos_event_move)
 {
-	ui_wdecor_t *wdecor;
+	errno_t rc;
 	gfx_rect_t rect;
 	pos_event_t event;
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
 	test_cb_resp_t resp;
-	errno_t rc;
-
-	rc = ui_wdecor_create(NULL, "Hello", ui_wds_decorated, &wdecor);
+	ui_resource_t *resource = NULL;
+	ui_wdecor_t *wdecor;
+
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_wdecor_create(resource, "Hello", ui_wds_decorated, &wdecor);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -386,4 +399,8 @@
 
 	ui_wdecor_destroy(wdecor);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -391,4 +408,7 @@
 PCUT_TEST(get_geom_none)
 {
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
 	ui_wdecor_t *wdecor;
 	gfx_rect_t rect;
@@ -396,5 +416,13 @@
 	errno_t rc;
 
-	rc = ui_wdecor_create(NULL, "Hello", ui_wds_none, &wdecor);
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_wdecor_create(resource, "Hello", ui_wds_none, &wdecor);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -428,4 +456,8 @@
 
 	ui_wdecor_destroy(wdecor);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -433,4 +465,7 @@
 PCUT_TEST(get_geom_frame)
 {
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
 	ui_wdecor_t *wdecor;
 	gfx_rect_t rect;
@@ -438,5 +473,13 @@
 	errno_t rc;
 
-	rc = ui_wdecor_create(NULL, "Hello", ui_wds_frame, &wdecor);
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_wdecor_create(resource, "Hello", ui_wds_frame, &wdecor);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -470,4 +513,8 @@
 
 	ui_wdecor_destroy(wdecor);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -475,4 +522,7 @@
 PCUT_TEST(get_geom_frame_titlebar)
 {
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
 	ui_wdecor_t *wdecor;
 	gfx_rect_t rect;
@@ -480,5 +530,13 @@
 	errno_t rc;
 
-	rc = ui_wdecor_create(NULL, "Hello", ui_wds_frame | ui_wds_titlebar,
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_wdecor_create(resource, "Hello", ui_wds_frame | ui_wds_titlebar,
 	    &wdecor);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -513,4 +571,8 @@
 
 	ui_wdecor_destroy(wdecor);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -518,4 +580,7 @@
 PCUT_TEST(get_geom_decorated)
 {
+	gfx_context_t *gc = NULL;
+	test_gc_t tgc;
+	ui_resource_t *resource = NULL;
 	ui_wdecor_t *wdecor;
 	gfx_rect_t rect;
@@ -523,5 +588,13 @@
 	errno_t rc;
 
-	rc = ui_wdecor_create(NULL, "Hello", ui_wds_decorated, &wdecor);
+	memset(&tgc, 0, sizeof(tgc));
+	rc = gfx_context_new(&ops, &tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = ui_resource_create(gc, false, &resource);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(resource);
+
+	rc = ui_wdecor_create(resource, "Hello", ui_wds_decorated, &wdecor);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -555,4 +628,8 @@
 
 	ui_wdecor_destroy(wdecor);
+	ui_resource_destroy(resource);
+
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -782,4 +859,10 @@
 }
 
+static errno_t testgc_update(void *arg)
+{
+	(void) arg;
+	return EOK;
+}
+
 static errno_t testgc_bitmap_create(void *arg, gfx_bitmap_params_t *params,
     gfx_bitmap_alloc_t *alloc, void **rbm)
