aboutsummaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-30 10:03:09 +0000
committermarha <marha@users.sourceforge.net>2010-11-30 10:03:09 +0000
commit3e2f3f105cfe65384d2adeb2bd678850d9be47f9 (patch)
tree1c3e43a774683e6e47cbd2293679b7115fbaa3cb /pixman
parentfed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7 (diff)
parent57818d0fe4f7cf94279909f03ec11b326b284f1e (diff)
downloadvcxsrv-3e2f3f105cfe65384d2adeb2bd678850d9be47f9.tar.gz
vcxsrv-3e2f3f105cfe65384d2adeb2bd678850d9be47f9.tar.bz2
vcxsrv-3e2f3f105cfe65384d2adeb2bd678850d9be47f9.zip
svn merge ^/branches/released .
Diffstat (limited to 'pixman')
-rw-r--r--pixman/COPYING2
-rw-r--r--pixman/configure.ac2
-rw-r--r--pixman/pixman/pixman-fast-path.c87
-rw-r--r--pixman/pixman/pixman.c7
-rw-r--r--pixman/pixman/solaris-hwcap.mapfile60
5 files changed, 123 insertions, 35 deletions
diff --git a/pixman/COPYING b/pixman/COPYING
index 48ea58bdd..47c22c370 100644
--- a/pixman/COPYING
+++ b/pixman/COPYING
@@ -18,7 +18,7 @@ possible. They may also add themselves to the list below.
* Copyright 2008 André Tupinambá
* Copyright 2008 Mozilla Corporation
* Copyright 2008 Frederic Plourde
- * Copyright 2009 Sun Microsystems, Inc.
+ * Copyright 2009, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/pixman/configure.ac b/pixman/configure.ac
index ca09534f5..683e6aabe 100644
--- a/pixman/configure.ac
+++ b/pixman/configure.ac
@@ -58,7 +58,7 @@ m4_define([pixman_micro], 3)
m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
-AC_INIT(pixman, pixman_version, "pixman@lists.freedesktop.org", pixman)
+AC_INIT(pixman, pixman_version, [pixman@lists.freedesktop.org], pixman)
AM_INIT_AUTOMAKE([foreign dist-bzip2])
# Suppress verbose compile lines
diff --git a/pixman/pixman/pixman-fast-path.c b/pixman/pixman/pixman-fast-path.c
index dc8fad06d..01a3017c7 100644
--- a/pixman/pixman/pixman-fast-path.c
+++ b/pixman/pixman/pixman-fast-path.c
@@ -1334,7 +1334,11 @@ fast_composite_solid_fill (pixman_implementation_t *imp,
src = _pixman_image_get_solid (src_image, dst_image->bits.format);
- if (dst_image->bits.format == PIXMAN_a8)
+ if (dst_image->bits.format == PIXMAN_a1)
+ {
+ src = src >> 31;
+ }
+ else if (dst_image->bits.format == PIXMAN_a8)
{
src = src >> 24;
}
@@ -1655,6 +1659,7 @@ static const pixman_fast_path_t c_fast_paths[] =
PIXMAN_STD_FAST_PATH (SRC, solid, null, x8r8g8b8, fast_composite_solid_fill),
PIXMAN_STD_FAST_PATH (SRC, solid, null, a8b8g8r8, fast_composite_solid_fill),
PIXMAN_STD_FAST_PATH (SRC, solid, null, x8b8g8r8, fast_composite_solid_fill),
+ PIXMAN_STD_FAST_PATH (SRC, solid, null, a1, fast_composite_solid_fill),
PIXMAN_STD_FAST_PATH (SRC, solid, null, a8, fast_composite_solid_fill),
PIXMAN_STD_FAST_PATH (SRC, solid, null, r5g6b5, fast_composite_solid_fill),
PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, a8r8g8b8, fast_composite_src_x888_8888),
@@ -1733,6 +1738,82 @@ static const pixman_fast_path_t c_fast_paths[] =
{ PIXMAN_OP_NONE },
};
+#ifdef WORDS_BIGENDIAN
+#define A1_FILL_MASK(n, offs) (((1 << (n)) - 1) << (32 - (offs) - (n)))
+#else
+#define A1_FILL_MASK(n, offs) (((1 << (n)) - 1) << (offs))
+#endif
+
+static force_inline void
+pixman_fill1_line (uint32_t *dst, int offs, int width, int v)
+{
+ if (offs)
+ {
+ int leading_pixels = 32 - offs;
+ if (leading_pixels >= width)
+ {
+ if (v)
+ *dst |= A1_FILL_MASK (width, offs);
+ else
+ *dst &= ~A1_FILL_MASK (width, offs);
+ return;
+ }
+ else
+ {
+ if (v)
+ *dst++ |= A1_FILL_MASK (leading_pixels, offs);
+ else
+ *dst++ &= ~A1_FILL_MASK (leading_pixels, offs);
+ width -= leading_pixels;
+ }
+ }
+ while (width >= 32)
+ {
+ if (v)
+ *dst++ = 0xFFFFFFFF;
+ else
+ *dst++ = 0;
+ width -= 32;
+ }
+ if (width > 0)
+ {
+ if (v)
+ *dst |= A1_FILL_MASK (width, 0);
+ else
+ *dst &= ~A1_FILL_MASK (width, 0);
+ }
+}
+
+static void
+pixman_fill1 (uint32_t *bits,
+ int stride,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ uint32_t *dst = bits + y * stride + (x >> 5);
+ int offs = x & 31;
+
+ if (xor & 1)
+ {
+ while (height--)
+ {
+ pixman_fill1_line (dst, offs, width, 1);
+ dst += stride;
+ }
+ }
+ else
+ {
+ while (height--)
+ {
+ pixman_fill1_line (dst, offs, width, 0);
+ dst += stride;
+ }
+ }
+}
+
static void
pixman_fill8 (uint32_t *bits,
int stride,
@@ -1819,6 +1900,10 @@ fast_path_fill (pixman_implementation_t *imp,
{
switch (bpp)
{
+ case 1:
+ pixman_fill1 (bits, stride, x, y, width, height, xor);
+ break;
+
case 8:
pixman_fill8 (bits, stride, x, y, width, height, xor);
break;
diff --git a/pixman/pixman/pixman.c b/pixman/pixman/pixman.c
index d41e7bd26..8b24849af 100644
--- a/pixman/pixman/pixman.c
+++ b/pixman/pixman/pixman.c
@@ -875,7 +875,8 @@ color_to_pixel (pixman_color_t * color,
format == PIXMAN_b8g8r8x8 ||
format == PIXMAN_r5g6b5 ||
format == PIXMAN_b5g6r5 ||
- format == PIXMAN_a8))
+ format == PIXMAN_a8 ||
+ format == PIXMAN_a1))
{
return FALSE;
}
@@ -895,7 +896,9 @@ color_to_pixel (pixman_color_t * color,
((c & 0x000000ff) << 24);
}
- if (format == PIXMAN_a8)
+ if (format == PIXMAN_a1)
+ c = c >> 31;
+ else if (format == PIXMAN_a8)
c = c >> 24;
else if (format == PIXMAN_r5g6b5 ||
format == PIXMAN_b5g6r5)
diff --git a/pixman/pixman/solaris-hwcap.mapfile b/pixman/pixman/solaris-hwcap.mapfile
index 3605ca79f..e49d4f1ec 100644
--- a/pixman/pixman/solaris-hwcap.mapfile
+++ b/pixman/pixman/solaris-hwcap.mapfile
@@ -1,30 +1,30 @@
-###############################################################################
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
-###############################################################################
-#
-# Override the linker's detection of CMOV/MMX/SSE instructions so this
-# library isn't flagged as only usable on CPU's with those ISA's, since it
-# checks at runtime for availability before calling them
-
-hwcap_1 = V0x0 FPU OVERRIDE;
+###############################################################################
+#
+# Copyright 2009, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+###############################################################################
+#
+# Override the linker's detection of CMOV/MMX/SSE instructions so this
+# library isn't flagged as only usable on CPU's with those ISA's, since it
+# checks at runtime for availability before calling them
+
+hwcap_1 = V0x0 FPU OVERRIDE;