Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/pixman merge pixman 0.36.0.
details: https://anonhg.NetBSD.org/xsrc/rev/fced602de2e4
branches: trunk
changeset: 10045:fced602de2e4
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Dec 30 08:59:39 2018 +0000
description:
merge pixman 0.36.0.
diffstat:
external/mit/pixman/dist/pixman/pixman-bits-image.c | 3 +
external/mit/pixman/dist/pixman/pixman-private.h | 3 +-
external/mit/pixman/dist/pixman/pixman.h | 35 ++++++++++++++++----
external/mit/pixman/include/config.h | 3 +
4 files changed, 34 insertions(+), 10 deletions(-)
diffs (102 lines):
diff -r 1807f3a7b909 -r fced602de2e4 external/mit/pixman/dist/pixman/pixman-bits-image.c
--- a/external/mit/pixman/dist/pixman/pixman-bits-image.c Sun Dec 30 08:55:27 2018 +0000
+++ b/external/mit/pixman/dist/pixman/pixman-bits-image.c Sun Dec 30 08:59:39 2018 +0000
@@ -948,6 +948,9 @@
{
uint32_t *free_me = NULL;
+ if (PIXMAN_FORMAT_BPP (format) == 128)
+ return_val_if_fail(!(rowstride % 4), FALSE);
+
if (!bits && width && height)
{
int rowstride_bytes;
diff -r 1807f3a7b909 -r fced602de2e4 external/mit/pixman/dist/pixman/pixman-private.h
--- a/external/mit/pixman/dist/pixman/pixman-private.h Sun Dec 30 08:55:27 2018 +0000
+++ b/external/mit/pixman/dist/pixman/pixman-private.h Sun Dec 30 08:59:39 2018 +0000
@@ -1,5 +1,3 @@
-#include <float.h>
-
#ifndef PIXMAN_PRIVATE_H
#define PIXMAN_PRIVATE_H
@@ -30,6 +28,7 @@
#include <stdio.h>
#include <string.h>
#include <stddef.h>
+#include <float.h>
#include "pixman-compiler.h"
diff -r 1807f3a7b909 -r fced602de2e4 external/mit/pixman/dist/pixman/pixman.h
--- a/external/mit/pixman/dist/pixman/pixman.h Sun Dec 30 08:55:27 2018 +0000
+++ b/external/mit/pixman/dist/pixman/pixman.h Sun Dec 30 08:59:39 2018 +0000
@@ -655,12 +655,24 @@
((g) << 4) | \
((b)))
-#define PIXMAN_FORMAT_BPP(f) (((f) >> 24) )
-#define PIXMAN_FORMAT_TYPE(f) (((f) >> 16) & 0xff)
-#define PIXMAN_FORMAT_A(f) (((f) >> 12) & 0x0f)
-#define PIXMAN_FORMAT_R(f) (((f) >> 8) & 0x0f)
-#define PIXMAN_FORMAT_G(f) (((f) >> 4) & 0x0f)
-#define PIXMAN_FORMAT_B(f) (((f) ) & 0x0f)
+#define PIXMAN_FORMAT_BYTE(bpp,type,a,r,g,b) \
+ (((bpp >> 3) << 24) | \
+ (3 << 22) | ((type) << 16) | \
+ ((a >> 3) << 12) | \
+ ((r >> 3) << 8) | \
+ ((g >> 3) << 4) | \
+ ((b >> 3)))
+
+#define PIXMAN_FORMAT_RESHIFT(val, ofs, num) \
+ (((val >> (ofs)) & ((1 << (num)) - 1)) << ((val >> 22) & 3))
+
+#define PIXMAN_FORMAT_BPP(f) PIXMAN_FORMAT_RESHIFT(f, 24, 8)
+#define PIXMAN_FORMAT_SHIFT(f) ((uint32_t)((f >> 22) & 3))
+#define PIXMAN_FORMAT_TYPE(f) (((f) >> 16) & 0x3f)
+#define PIXMAN_FORMAT_A(f) PIXMAN_FORMAT_RESHIFT(f, 12, 4)
+#define PIXMAN_FORMAT_R(f) PIXMAN_FORMAT_RESHIFT(f, 8, 4)
+#define PIXMAN_FORMAT_G(f) PIXMAN_FORMAT_RESHIFT(f, 4, 4)
+#define PIXMAN_FORMAT_B(f) PIXMAN_FORMAT_RESHIFT(f, 0, 4)
#define PIXMAN_FORMAT_RGB(f) (((f) ) & 0xfff)
#define PIXMAN_FORMAT_VIS(f) (((f) ) & 0xffff)
#define PIXMAN_FORMAT_DEPTH(f) (PIXMAN_FORMAT_A(f) + \
@@ -679,15 +691,22 @@
#define PIXMAN_TYPE_BGRA 8
#define PIXMAN_TYPE_RGBA 9
#define PIXMAN_TYPE_ARGB_SRGB 10
+#define PIXMAN_TYPE_RGBA_FLOAT 11
#define PIXMAN_FORMAT_COLOR(f) \
(PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \
PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR || \
PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA || \
- PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA)
+ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA || \
+ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA_FLOAT)
+
+typedef enum {
+/* 128bpp formats */
+ PIXMAN_rgba_float = PIXMAN_FORMAT_BYTE(128,PIXMAN_TYPE_RGBA_FLOAT,32,32,32,32),
+/* 96bpp formats */
+ PIXMAN_rgb_float = PIXMAN_FORMAT_BYTE(96,PIXMAN_TYPE_RGBA_FLOAT,0,32,32,32),
/* 32bpp formats */
-typedef enum {
PIXMAN_a8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,8,8,8,8),
PIXMAN_x8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,8,8,8),
PIXMAN_a8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,8,8,8,8),
diff -r 1807f3a7b909 -r fced602de2e4 external/mit/pixman/include/config.h
--- a/external/mit/pixman/include/config.h Sun Dec 30 08:55:27 2018 +0000
+++ b/external/mit/pixman/include/config.h Sun Dec 30 08:59:39 2018 +0000
@@ -106,6 +106,9 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.34.0"
+/* enable output that can be piped to gnuplot */
+/* #undef PIXMAN_GNUPLOT */
+
/* enable TIMER_BEGIN/TIMER_END macros */
/* #undef PIXMAN_TIMERS */
Home |
Main Index |
Thread Index |
Old Index