From 0db75bb3f91fc058c56650100f75cea5204c6af6 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Mon, 30 Jun 2014 16:34:20 +0100 Subject: lib: Don't take a reference to the surface in get_cairo_surface() We don't need to keep a reference to the surface, the cairo context will keep a reference to it until we destroy it. Signed-off-by: Damien Lespiau --- lib/igt_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 83f43433..d07af0d3 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -547,7 +547,7 @@ static cairo_surface_t *get_cairo_surface(int fd, struct igt_fb *fb) I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); igt_assert(cairo_surface_status(fb->cairo_surface) == CAIRO_STATUS_SUCCESS); - return cairo_surface_reference(fb->cairo_surface); + return fb->cairo_surface; } /** -- cgit v1.2.3