Re: X server 1.6_beta1 pending pixman
2008/11/25 Soeren Sandmann <[EMAIL PROTECTED]>: > Keith Packard <[EMAIL PROTECTED]> writes: > >> So, we'll see if we can't get a bit of pixman review and perhaps a >> pixman release done tomorrow so that the X server beta can head out. > > Here are some comments on the matrix code. I didn't review all the > numericals, but nothing jumped out at me either. > > - I'd like to have the interface const correct, for example in > >pixman_transform_multily (struct pixman_transform_t *dst, > struct pixman_transform_t *l, > struct pixman_transform_t *r); > > l and r could be const > > - For the rotation interfaces, maybe expand the names s and c to sin > and cos? I first thought c meant center and was then mystified what > s could mean. > > - The interfaces that take forward/reverse matrices should probably > accept NULL's. > > - Pixman's version numbering scheme is similar to cairo's: The git > master version has an odd micro number, released versions have even > micro numbers. > > - The name pixman_f_transform bothers me, but I don't have a better > suggestion since pixman_transformf would be worse. How about pixman_fourier_transform ? Why abbreviate it? John ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6_beta1 pending pixman
On Wed, Nov 26, 2008 at 09:49:30AM +0100, Arkadiusz Miskiewicz wrote: > On Tuesday 25 of November 2008, Keith Packard wrote: > > Søren asked me to move the render matrix operations into pixman, which > > makes perfect sense. However, that means that X server 1.6 will depend > > on a pixman with those functions, so I can't release beta1 until pixman > > is ready to ship with that stuff as well. > > ... and inputproto, too since required 1.9.99.6 release doesn't exist. input requires a few special patches which I'll have done by the weekend. Cheers, Peter ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6_beta1 pending pixman
On Tuesday 25 of November 2008, Keith Packard wrote: > Søren asked me to move the render matrix operations into pixman, which > makes perfect sense. However, that means that X server 1.6 will depend > on a pixman with those functions, so I can't release beta1 until pixman > is ready to ship with that stuff as well. ... and inputproto, too since required 1.9.99.6 release doesn't exist. -- Arkadiusz MiśkiewiczPLD/Linux Team arekm / maven.plhttp://ftp.pld-linux.org/ ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6_beta1 pending pixman
On Tue, 2008-11-25 at 19:17 +0100, Soeren Sandmann wrote: > Keith Packard <[EMAIL PROTECTED]> writes: > > > > - Pixman's version numbering scheme is similar to cairo's: The git > > > master version has an odd micro number, released versions have even > > > micro numbers. > > > > What version would you like? > > Before releasing, bump to 0.13.2, after releasing, bump to 0.13.3. Or > if you don't want to release, but still want a number to depend on, > just bump to 0.13.3. Ok, so I've set it to 0.13.2 in this patch: From ba65df0b2ac45582eba952acad31ce6a8c61c2f2 Mon Sep 17 00:00:00 2001 From: Keith Packard <[EMAIL PROTECTED]> Date: Mon, 24 Nov 2008 11:49:32 -0800 Subject: [PATCH] Move matrix operations from X server to pixman Signed-off-by: Keith Packard <[EMAIL PROTECTED]> --- configure.ac |2 +- pixman/Makefile.am |3 +- pixman/pixman-matrix.c | 598 pixman/pixman-utils.c | 32 --- pixman/pixman.h| 150 - 5 files changed, 748 insertions(+), 37 deletions(-) create mode 100644 pixman/pixman-matrix.c diff --git a/configure.ac b/configure.ac index 7937f95..063f6eb 100644 --- a/configure.ac +++ b/configure.ac @@ -54,7 +54,7 @@ AC_PREREQ([2.57]) m4_define([pixman_major], 0) m4_define([pixman_minor], 13) -m4_define([pixman_micro], 1) +m4_define([pixman_micro], 2) m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro]) diff --git a/pixman/Makefile.am b/pixman/Makefile.am index 6d5a643..c4612ea 100644 --- a/pixman/Makefile.am +++ b/pixman/Makefile.am @@ -26,7 +26,8 @@ libpixman_1_la_SOURCES = \ pixman-edge-imp.h \ pixman-trap.c \ pixman-compute-region.c \ - pixman-timer.c + pixman-timer.c \ + pixman-matrix.c libpixmanincludedir = $(includedir)/pixman-1/ libpixmaninclude_HEADERS = pixman.h pixman-version.h diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c new file mode 100644 index 000..28124bd --- /dev/null +++ b/pixman/pixman-matrix.c @@ -0,0 +1,598 @@ +/* + * Copyright © 2008 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * Floating point matrix interfaces + */ + +#include "config.h" +#include +#include +#include "pixman-private.h" + +#define F(x) pixman_int_to_fixed(x) + +PIXMAN_EXPORT void +pixman_transform_init_identity(struct pixman_transform *matrix) +{ + int i; + + memset(matrix, '\0', sizeof (struct pixman_transform)); + for (i = 0; i < 3; i++) + matrix->matrix[i][i] = F(1); +} + +typedef pixman_fixed_32_32_t pixman_fixed_34_30_t; + +PIXMAN_EXPORT pixman_bool_t +pixman_transform_point_3d(const struct pixman_transform *transform, + struct pixman_vector *vector) +{ + struct pixman_vector result; + pixman_fixed_32_32_t partial; + pixman_fixed_48_16_t v; + int i, j; + + for (j = 0; j < 3; j++) + { + v = 0; + for (i = 0; i < 3; i++) + { + partial = ((pixman_fixed_48_16_t) transform->matrix[j][i] * + (pixman_fixed_48_16_t) vector->vector[i]); + v += partial >> 16; + } + if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16) + return FALSE; + result.vector[j] = (pixman_fixed_t) v; + } + *vector = result; + if (!result.vector[2]) + return FALSE; + return TRUE; +} + +PIXMAN_EXPORT pixman_bool_t +pixman_transform_point(const struct pixman_transform *transform, + struct pixman_vector *vector) +{ + pixman_fixed_32_32_t partial; + pixman_fixed_34_30_t v[3]; + pixman_fixed_48_1
Re: X server 1.6_beta1 pending pixman
Keith Packard <[EMAIL PROTECTED]> writes: > > - Pixman's version numbering scheme is similar to cairo's: The git > > master version has an odd micro number, released versions have even > > micro numbers. > > What version would you like? Before releasing, bump to 0.13.2, after releasing, bump to 0.13.3. Or if you don't want to release, but still want a number to depend on, just bump to 0.13.3. Soren ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6_beta1 pending pixman
On Tue, 2008-11-25 at 17:58 +0100, Soeren Sandmann wrote: > Keith Packard <[EMAIL PROTECTED]> writes: > > > So, we'll see if we can't get a bit of pixman review and perhaps a > > pixman release done tomorrow so that the X server beta can head out. > > Here are some comments on the matrix code. I didn't review all the > numericals, but nothing jumped out at me either. I just copied the code from the X server where it hasn't demonstrated any problems. I think most of the paths are actually tested in the projective transform RandR work too. > - I'd like to have the interface const correct, for example in > > pixman_transform_multily (struct pixman_transform_t *dst, > struct pixman_transform_t *l, > struct pixman_transform_t *r); Yeah, I briefly considered doing that; I'll go fix it. > - For the rotation interfaces, maybe expand the names s and c to sin > and cos? I first thought c meant center and was then mystified what > s could mean. Ok. > - The interfaces that take forward/reverse matrices should probably > accept NULL's. Ok. > - Pixman's version numbering scheme is similar to cairo's: The git > master version has an odd micro number, released versions have even > micro numbers. What version would you like? > - The name pixman_f_transform bothers me, but I don't have a better > suggestion since pixman_transformf would be worse. I'll leave this alone then. > - Is there any particular reason for the fixed point epsilon of 2 (as > opposed to 1)? Just giving more space to allow for rounding errors. > - There is a comment about floating point interfaces, but the file > contains both fixed and floating point interfaces. I'll fix the comment. Thanks for the review! -- [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: X server 1.6_beta1 pending pixman
Keith Packard <[EMAIL PROTECTED]> writes: > So, we'll see if we can't get a bit of pixman review and perhaps a > pixman release done tomorrow so that the X server beta can head out. Here are some comments on the matrix code. I didn't review all the numericals, but nothing jumped out at me either. - I'd like to have the interface const correct, for example in pixman_transform_multily (struct pixman_transform_t *dst, struct pixman_transform_t *l, struct pixman_transform_t *r); l and r could be const - For the rotation interfaces, maybe expand the names s and c to sin and cos? I first thought c meant center and was then mystified what s could mean. - The interfaces that take forward/reverse matrices should probably accept NULL's. - Pixman's version numbering scheme is similar to cairo's: The git master version has an odd micro number, released versions have even micro numbers. - The name pixman_f_transform bothers me, but I don't have a better suggestion since pixman_transformf would be worse. - Is there any particular reason for the fixed point epsilon of 2 (as opposed to 1)? - There is a comment about floating point interfaces, but the file contains both fixed and floating point interfaces. Thanks, Soren ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
X server 1.6_beta1 pending pixman
Søren asked me to move the render matrix operations into pixman, which makes perfect sense. However, that means that X server 1.6 will depend on a pixman with those functions, so I can't release beta1 until pixman is ready to ship with that stuff as well. I don't mind shipping an X server beta that depends on pixman beta bits, but I don't want to ship an X server that requires unreviewed code. So, we'll see if we can't get a bit of pixman review and perhaps a pixman release done tomorrow so that the X server beta can head out. -- [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg