[weston,v2,10/20] compositor: use weston_matrix_transform_region for overlay setup

Submitted by Derek Foreman on Oct. 16, 2014, 3:55 p.m.

Details

Message ID 1413474938-2407-11-git-send-email-derekf@osg.samsung.com
State Changes Requested
Headers show

Not browsing as part of any series.

Commit Message

Derek Foreman Oct. 16, 2014, 3:55 p.m.
---
 src/compositor-drm.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 07b83a7..c997c26 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -919,17 +919,13 @@  drm_output_prepare_overlay_view(struct weston_output *output_base,
 	pixman_region32_init(&dest_rect);
 	pixman_region32_intersect(&dest_rect, &ev->transform.boundingbox,
 				  &output_base->region);
-	pixman_region32_translate(&dest_rect, -output_base->x, -output_base->y);
+	weston_matrix_transform_region(&dest_rect, &output_base->matrix, &dest_rect);
 	box = pixman_region32_extents(&dest_rect);
-	tbox = weston_transformed_rect(output_base->width,
-				       output_base->height,
-				       output_base->transform,
-				       output_base->current_scale,
-				       *box);
-	s->dest_x = tbox.x1;
-	s->dest_y = tbox.y1;
-	s->dest_w = tbox.x2 - tbox.x1;
-	s->dest_h = tbox.y2 - tbox.y1;
+
+	s->dest_x = box->x1;
+	s->dest_y = box->y1;
+	s->dest_w = box->x2 - box->x1;
+	s->dest_h = box->y2 - box->y1;
 	pixman_region32_fini(&dest_rect);
 
 	pixman_region32_init(&src_rect);