aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/xorg-lib/pixman-0.21.4/0017-add-_pixman_bits_override_accessors.patch
blob: b7983b2081b4d0c26b784a92248e0014cfbe9d44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From 6593d86679fde724e49efa96b16ca22d9521b288 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date: Thu, 10 Dec 2009 00:51:50 +0200
Subject: [PATCH 17/24] add _pixman_bits_override_accessors

* from patch ARM: HACK: added NEON optimizations for fetch/store r5g6b5 scanline
* used in
  0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch
  0006-ARM-added-NEON-optimizations-for-fetch-store-a8-scan.patch
  0007-ARM-added-NEON-optimizations-for-fetching-x8r8g8b8-s.patch
---
 pixman/pixman-access.c  |   23 ++++++++++++++++++++++-
 pixman/pixman-private.h |    5 +++++
 2 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index f1ce0ba..b33da29 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -2836,7 +2836,7 @@ typedef struct
 	    store_scanline_ ## format, store_scanline_generic_64	\
     }
 
-static const format_info_t accessors[] =
+static format_info_t accessors[] =
 {
 /* 32 bpp formats */
     FORMAT_INFO (a8r8g8b8),
@@ -2978,6 +2978,27 @@ _pixman_bits_image_setup_accessors (bits_image_t *image)
 	setup_accessors (image);
 }
 
+void
+_pixman_bits_override_accessors (pixman_format_code_t format,
+                                 fetch_scanline_t     fetch_func,
+                                 store_scanline_t     store_func)
+{
+    format_info_t *info = accessors;
+
+    while (info->format != PIXMAN_null)
+    {
+	if (info->format == format)
+	{
+	    if (fetch_func)
+		info->fetch_scanline_32 = fetch_func;
+	    if (store_func)
+		info->store_scanline_32 = store_func;
+	    return;
+	}
+	info++;
+    }
+}
+
 #else
 
 void
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 1662d2c..c0f9af4 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -256,6 +256,11 @@ _pixman_conical_gradient_iter_init (pixman_image_t *image,
 				    int x, int y, int width, int height,
 				    uint8_t *buffer, iter_flags_t flags);
 
+void
+_pixman_bits_override_accessors (pixman_format_code_t format,
+				 fetch_scanline_t     fetch_func,
+				 store_scanline_t     store_func);
+
 pixman_image_t *
 _pixman_image_allocate (void);
 
-- 
1.7.4.rc2