summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/libpixman/src/pixman-accessor.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /gfx/cairo/libpixman/src/pixman-accessor.h
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--gfx/cairo/libpixman/src/pixman-accessor.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gfx/cairo/libpixman/src/pixman-accessor.h b/gfx/cairo/libpixman/src/pixman-accessor.h
new file mode 100644
index 0000000000..8e0b03621b
--- /dev/null
+++ b/gfx/cairo/libpixman/src/pixman-accessor.h
@@ -0,0 +1,25 @@
+#ifdef PIXMAN_FB_ACCESSORS
+
+#define READ(img, ptr) \
+ (((bits_image_t *)(img))->read_func ((ptr), sizeof(*(ptr))))
+#define WRITE(img, ptr,val) \
+ (((bits_image_t *)(img))->write_func ((ptr), (val), sizeof (*(ptr))))
+
+#define MEMSET_WRAPPED(img, dst, val, size) \
+ do { \
+ size_t _i; \
+ uint8_t *_dst = (uint8_t*)(dst); \
+ for(_i = 0; _i < (size_t) size; _i++) { \
+ WRITE((img), _dst +_i, (val)); \
+ } \
+ } while (0)
+
+#else
+
+#define READ(img, ptr) (*(ptr))
+#define WRITE(img, ptr, val) (*(ptr) = (val))
+#define MEMSET_WRAPPED(img, dst, val, size) \
+ memset(dst, val, size)
+
+#endif
+