From 4d7c862278e4db31ef5c494e12f4c3b77e7c719c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 24 Feb 2012 11:03:27 -0500 Subject: [PATCH] drm: Remove redundant cursor region math We already check this in weston_output_set_cursor(). --- src/compositor-drm.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index d41c957d..38ff02be 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -637,7 +637,6 @@ drm_output_set_cursor(struct weston_output *output_base, (struct drm_compositor *) output->base.compositor; EGLint handle, stride; int ret = -1; - pixman_region32_t cursor_region; struct gbm_bo *bo; if (eid == NULL) { @@ -645,20 +644,6 @@ drm_output_set_cursor(struct weston_output *output_base, return 0; } - pixman_region32_init_rect(&cursor_region, - eid->sprite->geometry.x, - eid->sprite->geometry.y, - eid->sprite->geometry.width, - eid->sprite->geometry.height); - - pixman_region32_intersect_rect(&cursor_region, &cursor_region, - output->base.x, output->base.y, - output->base.current->width, - output->base.current->height); - - if (!pixman_region32_not_empty(&cursor_region)) - goto out; - if (eid->sprite->image == EGL_NO_IMAGE_KHR) goto out; @@ -698,7 +683,6 @@ drm_output_set_cursor(struct weston_output *output_base, } out: - pixman_region32_fini(&cursor_region); if (ret) drmModeSetCursor(c->drm.fd, output->crtc_id, 0, 0, 0); return ret;