lowlevel-blt-bench results for over_n_8888 (on ARMv6):
    Before          After
    Mean   StdDev   Mean   StdDev  Confidence  Change
L1  11.3   0.1      21.3   0.1     100.0%      +89.0%
L2  10.0   0.1      17.5   0.5     100.0%      +73.9%
M   8.6    0.0      14.1   0.0     100.0%      +63.0%
HT  5.1    0.0      12.7   0.1     100.0%      +148.8%
VT  4.9    0.0      12.4   0.1     100.0%      +151.3%
R   4.8    0.0      12.0   0.1     100.0%      +148.6%
RT  2.1    0.0      8.2    0.1     100.0%      +290.1%

Trimmed cairo-pref-traces does not show any significant change for this patch,
reflecting the fact that over_n_8888 is barely used in the traces.
---
 pixman/pixman-fast-path.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 5d52b4a..680149c 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -1182,6 +1182,43 @@ fast_composite_src_memcpy (pixman_implementation_t *imp,
     }
 }
 
+static void
+fast_composite_over_n_8888 (pixman_implementation_t *imp,
+                            pixman_composite_info_t *info)
+{
+    PIXMAN_COMPOSITE_ARGS (info);
+    uint32_t  src, srca;
+    uint32_t *dst_line, *dst;
+    int       dst_stride;
+    int32_t   w;
+
+    src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
+
+    srca = src >> 24;
+    if (src == 0)
+        return;
+    if (srca == 0xff)
+    {
+        fast_composite_solid_fill (imp, info);
+        return;
+    }
+
+    PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, 
dst_line, 1);
+
+    while (height--)
+    {
+        dst = dst_line;
+        dst_line += dst_stride;
+        w = width;
+
+        while (w--)
+        {
+            *dst = over (src, *dst);
+            dst++;
+        }
+    }
+}
+
 FAST_NEAREST (8888_8888_cover, 8888, 8888, uint32_t, uint32_t, SRC, COVER)
 FAST_NEAREST (8888_8888_none, 8888, 8888, uint32_t, uint32_t, SRC, NONE)
 FAST_NEAREST (8888_8888_pad, 8888, 8888, uint32_t, uint32_t, SRC, PAD)
@@ -1838,9 +1875,13 @@ static const pixman_fast_path_t c_fast_paths[] =
     PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, a8, a8r8g8b8, 
fast_composite_over_x888_8_8888),
     PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, x8b8g8r8, 
fast_composite_over_x888_8_8888),
     PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, a8b8g8r8, 
fast_composite_over_x888_8_8888),
+    PIXMAN_STD_FAST_PATH (OVER, solid, null, a8r8g8b8, 
fast_composite_over_n_8888),
+    PIXMAN_STD_FAST_PATH (OVER, solid, null, x8r8g8b8, 
fast_composite_over_n_8888),
     PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, a8r8g8b8, 
fast_composite_over_8888_8888),
     PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, 
fast_composite_over_8888_8888),
     PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, r5g6b5, 
fast_composite_over_8888_0565),
+    PIXMAN_STD_FAST_PATH (OVER, solid, null, a8b8g8r8, 
fast_composite_over_n_8888),
+    PIXMAN_STD_FAST_PATH (OVER, solid, null, x8b8g8r8, 
fast_composite_over_n_8888),
     PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, 
fast_composite_over_8888_8888),
     PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, 
fast_composite_over_8888_8888),
     PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, b5g6r5, 
fast_composite_over_8888_0565),
-- 
1.7.10.4

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to