Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/6] overlay: Remove the miscalculation of window position
@ 2018-05-14  8:02 Chris Wilson
  2018-05-14  8:02 ` [igt-dev] [PATCH i-g-t 2/6] lib/audio: Replace sqrt(a*a + b*b) with hypot(a, b) Chris Wilson
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Chris Wilson @ 2018-05-14  8:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

We already call x11_position() to calculate the position of the
overlay, so do not need to manually recompute them inside
x11_overlay_create(). This has the advantage that x11_position()
understands the multi-monitor layout instructions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 overlay/x11/x11-overlay.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/overlay/x11/x11-overlay.c b/overlay/x11/x11-overlay.c
index d08ebfc9c..ae6494295 100644
--- a/overlay/x11/x11-overlay.c
+++ b/overlay/x11/x11-overlay.c
@@ -271,22 +271,6 @@ x11_overlay_create(struct config *config, int *width, int *height)
 
 	priv->x = x;
 	priv->y = y;
-	if (position != POS_UNSET) {
-		switch (position & 7) {
-		default:
-		case 0: priv->x = 0; break;
-		case 1: priv->x = (scr->width - image->width)/2; break;
-		case 2: priv->x = scr->width - image->width; break;
-		}
-
-		switch ((position >> 4) & 7) {
-		default:
-		case 0: priv->y = 0; break;
-		case 1: priv->y = (scr->height - image->height)/2; break;
-		case 2: priv->y = scr->height - image->height; break;
-		}
-	}
-
 
 	priv->image = image;
 	priv->image->data = (void *)&priv->name;
-- 
2.17.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-05-15  8:45 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-14  8:02 [igt-dev] [PATCH i-g-t 1/6] overlay: Remove the miscalculation of window position Chris Wilson
2018-05-14  8:02 ` [igt-dev] [PATCH i-g-t 2/6] lib/audio: Replace sqrt(a*a + b*b) with hypot(a, b) Chris Wilson
2018-05-14 10:20   ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
2018-05-14  8:02 ` [igt-dev] [PATCH i-g-t 3/6] igt/gem_ctx_thrash: Order writes between contexts Chris Wilson
2018-05-14 10:59   ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
2018-05-14 15:10     ` Chris Wilson
2018-05-15  8:20       ` Tvrtko Ursulin
2018-05-15  8:29         ` Chris Wilson
2018-05-15  8:45           ` Tvrtko Ursulin
2018-05-14  8:02 ` [igt-dev] [PATCH i-g-t 4/6] igt/gem_eio: Exercise banning Chris Wilson
2018-05-14 11:01   ` [Intel-gfx] " Tvrtko Ursulin
2018-05-14  8:02 ` [igt-dev] [PATCH i-g-t 5/6] tests/gem_eio: Only wait-for-idle inside trigger_reset() Chris Wilson
2018-05-14 11:03   ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
2018-05-14 11:07     ` Chris Wilson
2018-05-14  8:02 ` [igt-dev] [PATCH i-g-t 6/6] tests/gem_exec_latency: New subtests for checking submission from RT tasks Chris Wilson
2018-05-14 11:13   ` [Intel-gfx] " Tvrtko Ursulin
2018-05-14 11:25     ` Chris Wilson
2018-05-14  8:52 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] overlay: Remove the miscalculation of window position Patchwork
2018-05-14 10:18 ` [igt-dev] [Intel-gfx] [PATCH i-g-t 1/6] " Tvrtko Ursulin
2018-05-14 10:31 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/6] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox