Hi,

I am wondering how mature two source blitting in SaWMan and DirectFB is.

Judging by the artefacts seen when using a slightly modified df_window
(to set DLBM_COLOR black instead of DLBM_IMAGE so SaWMan takes the
batchblit2 code path) seems to suggest there are still a couple of
issues to be worked on?

A it seems SaWMan passes source2/destination coordinates the wrong way
around to dfb_gfxcard_batchblit2().

B dfb_gfxcard_batchblit2() modifies the source2 coordinates incorrectly
after having applied the clipping to source1.

C SaWMan still passes wrong source2 coordinates after fixing A

So my question is should this be working?


Cheers,
Andre'

>From 5037667ddc3157113ff5fe2abf6e444aa6138c39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.dras...@st.com>
Date: Tue, 26 Oct 2010 15:35:02 +0100
Subject: [PATCH] draw: fix source2 / destination coordinate passing into DirectFB

---
 src/sawman_draw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sawman_draw.c b/src/sawman_draw.c
index 01aa2d6..2b7c153 100644
--- a/src/sawman_draw.c
+++ b/src/sawman_draw.c
@@ -485,7 +485,7 @@ draw_window( SaWManTier   *tier,
           p1.y = src2->y;
           p2.x = sawwin->dst.x;
           p2.y = sawwin->dst.y;
-          dfb_gfxcard_batchblit2( &src, &p1, &p2, 1, state );
+          dfb_gfxcard_batchblit2( &src, &p2, &p1, 1, state );
      }
      else
 #endif
-- 
1.7.1

>From ca6aa65e9dbb5c23ee32d0f53c2694e1d6657e53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.dras...@st.com>
Date: Tue, 26 Oct 2010 15:47:26 +0100
Subject: [PATCH] gfxcard: fix blit2 clipping

---
 src/core/gfxcard.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/core/gfxcard.c b/src/core/gfxcard.c
index b473cbd..2377387 100644
--- a/src/core/gfxcard.c
+++ b/src/core/gfxcard.c
@@ -2084,10 +2084,14 @@ void dfb_gfxcard_batchblit2( DFBRectangle *rects, DFBPoint *points, DFBPoint *po
                     if (!D_FLAGS_IS_SET( card->caps.flags, CCF_CLIPPING ) &&
                         !D_FLAGS_IS_SET( card->caps.clip, DFXL_BLIT2 ))
                     {
+                         DFBRectangle r = { points2[i].x, points2[i].y,
+                                            rects[i].w, rects[i].h };
+
                          dfb_clip_blit( &state->clip, &rects[i], &dx, &dy );
 
-                         points2[i].x += dx - points[i].x;
-                         points2[i].y += dy - points[i].y;
+                         dfb_clip_blit( &state->clip, &r, &dx, &dy );
+                         points2[i].x = r.x;
+                         points2[i].y = r.y;
                     }
 
                     if (!card->funcs.Blit2( card->driver_data, card->device_data,
-- 
1.7.1

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to