So we can use it in the next commit.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
abort();
}
-static cairo_t *create_cairo_ctx(int fd, struct kmstest_fb *fb)
+static cairo_surface_t *create_image_surface(int fd, struct kmstest_fb *fb)
{
- cairo_t *cr;
cairo_surface_t *surface;
cairo_format_t cformat;
void *fb_ptr;
cformat, fb->width,
fb->height, fb->stride);
assert(surface);
+
+ return surface;
+}
+
+static cairo_t *create_cairo_ctx(int fd, struct kmstest_fb *fb)
+{
+ cairo_t *cr;
+ cairo_surface_t *surface;
+
+ surface = create_image_surface(fd, fb);
cr = cairo_create(surface);
cairo_surface_destroy(surface);