[weston,v2,15/20] compositor: Remove weston_transformed_rect() and weston_transformed_coord()

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

Details

Message ID 1413474938-2407-16-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.
The last caller of weston_transformed_rect() has been replaced so we can
remove weston_transformed_rect() - since it was the last caller of
weston_transformed_coord() we can get rid of that too.
---
 src/compositor.c | 80 --------------------------------------------------------
 src/compositor.h | 10 -------
 2 files changed, 90 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/compositor.c b/src/compositor.c
index 00d404d..aef3246 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -699,86 +699,6 @@  weston_matrix_transform_rect(struct weston_matrix *matrix,
 }
 
 WL_EXPORT void
-weston_transformed_coord(int width, int height,
-			 enum wl_output_transform transform,
-			 int32_t scale,
-			 float sx, float sy, float *bx, float *by)
-{
-	switch (transform) {
-	case WL_OUTPUT_TRANSFORM_NORMAL:
-	default:
-		*bx = sx;
-		*by = sy;
-		break;
-	case WL_OUTPUT_TRANSFORM_FLIPPED:
-		*bx = width - sx;
-		*by = sy;
-		break;
-	case WL_OUTPUT_TRANSFORM_90:
-		*bx = height - sy;
-		*by = sx;
-		break;
-	case WL_OUTPUT_TRANSFORM_FLIPPED_90:
-		*bx = height - sy;
-		*by = width - sx;
-		break;
-	case WL_OUTPUT_TRANSFORM_180:
-		*bx = width - sx;
-		*by = height - sy;
-		break;
-	case WL_OUTPUT_TRANSFORM_FLIPPED_180:
-		*bx = sx;
-		*by = height - sy;
-		break;
-	case WL_OUTPUT_TRANSFORM_270:
-		*bx = sy;
-		*by = width - sx;
-		break;
-	case WL_OUTPUT_TRANSFORM_FLIPPED_270:
-		*bx = sy;
-		*by = sx;
-		break;
-	}
-
-	*bx *= scale;
-	*by *= scale;
-}
-
-WL_EXPORT pixman_box32_t
-weston_transformed_rect(int width, int height,
-			enum wl_output_transform transform,
-			int32_t scale,
-			pixman_box32_t rect)
-{
-	float x1, x2, y1, y2;
-
-	pixman_box32_t ret;
-
-	weston_transformed_coord(width, height, transform, scale,
-				 rect.x1, rect.y1, &x1, &y1);
-	weston_transformed_coord(width, height, transform, scale,
-				 rect.x2, rect.y2, &x2, &y2);
-
-	if (x1 <= x2) {
-		ret.x1 = x1;
-		ret.x2 = x2;
-	} else {
-		ret.x1 = x2;
-		ret.x2 = x1;
-	}
-
-	if (y1 <= y2) {
-		ret.y1 = y1;
-		ret.y2 = y2;
-	} else {
-		ret.y1 = y2;
-		ret.y2 = y1;
-	}
-
-	return ret;
-}
-
-WL_EXPORT void
 weston_matrix_transform_region(pixman_region32_t *dest,
 			       struct weston_matrix *matrix,
 			       pixman_region32_t *src)
diff --git a/src/compositor.h b/src/compositor.h
index bc22026..8d98306 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1462,16 +1462,6 @@  weston_matrix_transform_rect(struct weston_matrix *matrix,
 			     pixman_box32_t rect);
 
 void
-weston_transformed_coord(int width, int height,
-			 enum wl_output_transform transform,
-			 int32_t scale,
-			 float sx, float sy, float *bx, float *by);
-pixman_box32_t
-weston_transformed_rect(int width, int height,
-			enum wl_output_transform transform,
-			int32_t scale,
-			pixman_box32_t rect);
-void
 weston_matrix_transform_region(pixman_region32_t *dest,
                                struct weston_matrix *matrix,
                                pixman_region32_t *src);