Commit graph

257 commits

Author SHA1 Message Date
Dan Williams
5c2136ea7c Implement pixman fbCompositeSrc_8888x0565mmx
MMX-accelerate for fbCompositeSrc_8888x0565.  Upstream X bug for the
same issue:

http://bugs.freedesktop.org/show_bug.cgi?id=9682
2007-01-17 12:48:51 -08:00
Pavel Roskin
a2ec383ff1 Clean up _fbOnes()
The implementation of _FbOnes in iccolor.c would not work on 64-bit
longs correctly.  Fortunately, it's only used on integers, so make it
explicit in the declaration.

Use an inline function for the gcc builtin implementation to make sure
that it's never used with arguments of incorrect size.

There is no __INT_MIN__ in gcc 4.1.1, but it's not an issue now because
the argument is 32-bit.

Signed-off-by: Pavel Roskin <proski@gnu.org>
2007-01-16 16:38:36 -08:00
Soeren Sandmann
cf1d95e714 Add SRC and IN implementations to avoid CompositeGeneral in some cases hit by PDF rendering
The patch implements a few more operations with special cases MMX
code. On my laptop, applying the patch to cairo speeds up the
benchmark (rendering page 14 of a PDF file[*]) from 20.9 seconds
to 14.9 seconds, which is an improvement of 28.6%.

[*] http://people.redhat.com/jakub/prelink.pdf

This also benefits the recently added unaligned_clip perf case:

image-rgb  unaligned_clip-100 0.11 -> 0.06: 1.65x speedup
▋
image-rgba unaligned_clip-100 0.11 -> 0.06: 1.64x speedup
▋
2007-01-09 15:37:26 -08:00
Alp Toker
caa3c2e1e7 Fix various code/comment typos 2007-01-07 01:35:15 -05:00
David Turner
e9bef30d2b Optimize gradient computations
We update the test suite reference images where needed, (pdiff
avoided a few, but most still needed updating). We take advantage
of the need for new reference images to shrink some of the giant
tests to speed them up a bit.

This optimization provides a 2x improvement in linear gradient
generation performance (numbers from an x86 laptop):

image-rgb    paint_linear_rgba_source-512 26.13 -> 11.13: 2.35x speedup
█▍
image-rgb    paint_linear_rgba_source-256  6.47 ->  2.76: 2.34x speedup
█▍
image-rgba      paint_linear_rgb_over-256  6.51 ->  2.86: 2.28x speedup
█▎
image-rgb      paint_linear_rgba_over-512 28.62 -> 13.70: 2.09x speedup
█▏
image-rgba       fill_linear_rgb_over-256  3.24 ->  1.94: 1.66x speedup
▋
image-rgb     stroke_linear_rgba_over-256  5.68 ->  4.10: 1.39x speedup
▍
2006-12-14 09:27:45 -08:00
Carl Worth
af9cce6aa2 Fix 'make distcheck' after recent file removals 2006-12-14 09:18:26 -08:00
Behdad Esfahbod
6122c30930 [pixman] Remove unused slim_internal.h 2006-12-08 15:38:34 -05:00
Vladimir Vukicevic
3e002a474b [win32] Update pixman MMX code to work with MSVC
Patch from Tor Lillqvist.
2006-11-07 13:12:07 -08:00
Christian Biesinger
38dcddd79e fix comment: pixman_private needs to be before the type of a variable
Makes the documentation match the code.
Compare also commit 34d11aa3c4
2006-10-10 12:38:33 -07:00
Alfred Peng
34d11aa3c4 Use pixman_private consistently as prefix not suffix 2006-09-29 17:17:27 -07:00
Alfred Peng
c1495742f7 Add Sun Pro C definition of pixman_private 2006-09-29 17:16:47 -07:00
Vladimir Vukicevic
a56b962428 Add win32 output files to gitignore 2006-09-19 12:19:21 -07:00
Carl Worth
82b710ebc2 Add missing pixman_private to _FbOnes when a function.
This was thanks to a report from crucible (run #2113) since it tested
with older versions of gcc (3.3.6) than most of the cairo developers
use, (so we had been getting the _FbOnes macro not the function).
2006-09-19 10:13:36 -07:00
Vladimir Vukicevic
00d5a2ed48 [win32] Makefile.win32: use correct (/MD) runtime library flag everywhere
There was a bad mix of LIBCMT (the static runtime lib) and MSVCRT (the dynamic
one) before, because LIBCMT is the default.  This specifies /MD everywhere.
2006-09-09 23:29:17 -07:00
Vladimir Vukicevic
0e59041321 [win32] win32-specific Makefiles for building with MSVC
This patch adds a bunch of makefiles for building cairo with Visual C++.
gnu make is still required, and make must be run from a command prompt
that has the Visual C++ paths set up, as well as has the cygwin environment
in the path.  Run 'make -f Makefile.win32'.
2006-09-09 17:08:18 -07:00
Nicholas Miell
d598cd8d61 Fix the AMD64 final link by removing SLIM from pixman
In order for SLIM's PLT indirection avoidance to work, everything in
the library that makes internal function calls needs to see the
relevant slim_hidden_proto() macro in addition to the function's
prototype. However, external headers used by clients of the shared
library should not use the SLIM macros at all.

Pixman is a rather odd case -- it's mostly independent from cairo, so
it has it's own public interface, but it's built as a part of cairo
instead of its own shared library. This means that cairo would need to
see all of pixman's slim_hidden_proto() macros in order to function
and it doesn't currently, which results in a link failure on AMD64
systems and on i386 systems (I think, I haven't actually verified
this) it produces a shared object that isn't actally sharable.

I have no idea why exactly the link failure only showed up as a result
of commit e06246b9b1. I think it has
something to do with the pixman functions no longer having PLT entries
at all, but the exact interaction isn't clear to me.

However, all of these pixman functions aren't part of the cairo ABI
(which is why they were marked pixman_private in the first place),
which means that the SLIMification of pixman is largely pointless --
they aren't externally visible, so they don't need PLT entries at
all. Furthermore, while pixman may eventually be shared among cairo
and X, I'm told that this sharing will be source-level only, which
means it won't ever be an actual shared library and thus won't ever
need SLIM at all.

So, I just removed all use of SLIM in pixman (leaving behind
slim_internal.h for the future edification of anyone who cares).This
fixes the AMD64 link failure and passes the check-plt & check-def
parts of make check.

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
2006-09-07 12:48:28 -07:00
Nicholas Miell
203d70a562 Make the SLIM macros robust in the face of macro-renamed symbols
This doesn't actually fix the AMD64 link failure, but it does make the
foo/EXT_foo/INT_foo symbol names generated by the slim_hidden_proto()
and slim_hidden_def() macros consistent in the face of the meddling of
pixman-remap.h.

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
2006-09-07 12:48:23 -07:00
Carl Worth
e06246b9b1 pixman: Add pixman_private decorations to hide pixman symbols from public interface 2006-09-05 17:21:48 -07:00
Vladimir Vukicevic
72e25648c4 pixman: Use pSourceClip rather than pCompositeClip when fetching
This fixes the source-clip-scale test failures for most backends.
2006-08-17 13:35:16 -07:00
Pavel Roskin
b29cc61fac [pixman] Don't cast pointers to integers
This causes warnings on 64-bit platforms that may indicate very serious
problems.  Fortunately, not in this case.
2006-08-13 04:44:20 -04:00
Kjartan Maraas
22eee1db00 [warnings] Fixes for sparse. This fixes a lot of instances of 0 vs NULL 2006-08-11 11:18:24 -04:00
Alfred Peng
db06681b48 Fix leaks in failure paths in pixman gradient creation 2006-08-08 10:58:42 -07:00
Behdad Esfahbod
77fd0efa9a Fix few remaining compiler warnings, revealed by -O3 2006-08-08 02:58:50 -04:00
Carl Worth
959b85e98c Merge branch 'warnings-cleanup' into cairo
Conflicts:

	src/cairo-font-subset.c
2006-08-07 15:06:47 -07:00
Carl Worth
43b579d757 Add -Wswitch-enum compiler flag and fix all trivial warnings 2006-08-07 14:30:06 -07:00
Behdad Esfahbod
d1f9bef30e Add -Wunsafe-loop-optimizations compiler flag and fix all warnings 2006-08-07 14:24:32 -07:00
Carl Worth
9ae66174e7 Fix bug 7294 by adding pixman BGR formats and internal cairo BGR formats.
This approach to fixing the bug is valid since there is code in pixman
for rendering to BGR images, (which is why cairo 1.0 worked with BGR X
servers for example). But, since we don't want to advertise additional
image formats we implement this through a new cairo_internal_format_t.

This is rather fragile since we don't want to leak any internal formats
nor do we ever want an internal format to be used somewhere a real
format is expected, (and trigger a CAIRO_FORMAT_VALID assertion failure).
More comments than code are added here to help compensate for the
fragility and to give some guidance in fixing this mess in a better way
in the future.
2006-08-07 11:19:19 -07:00
Carl Worth
eb9caf0833 Add -Wsign-compare compiler flag and fix all warnings 2006-07-28 22:50:06 -07:00
Behdad Esfahbod
84b37568e1 Add -Wold-style-definition compiler falg and fix all warnings. 2006-07-28 15:23:22 -07:00
Carl Worth
7285499700 Squelch some bogus compiler warnings about possibly uninitialized values. 2006-06-29 05:07:51 +02:00
Torsten Schoenfeld
e747bbd350 Fix build after recent pixman.h change.
The recent pixman.h change to use configure-generated defines
accidentally broke the build.  Pulling in config.h fixes it.
2006-06-25 15:25:23 +02:00
Carl Worth
e32138aa93 Prefer using configure-generated variable for finding stdint.h or similar.
We were doing something more complicated originally, and that was because
pixman.h was an installed public header file at one time. But that hasn't
been the case for quite a long time.
2006-06-25 14:42:27 +02:00
Carl Worth
c6164d0d2a New API: Add support for new CAIRO_FORMAT_RGB16_565 2006-06-16 08:46:34 -07:00
Behdad Esfahbod
a8b736c160 Use enum time instead of int (shuts intel compiler up.) 2006-06-16 00:08:44 -04:00
Bertram Felgenhauer
b104a79502 Patch to fix pixman samping location bug (#2488). 2006-06-13 20:10:59 -04:00
Carl Worth
0ee64b8468 Bug 4196: undef MIN an MAX before defining to avoid duplicate definition 2006-06-13 16:50:43 -07:00
Zakharov Mikhail
32c0e85d45 pixman: fix compilation on HP-UX 11.11 2006-06-07 09:42:48 -07:00
Carl Worth
ef10a0403a Remove initial, final, and duplicate blank lines.
This patch was produced by running git-stripspace on all *.[ch] files
within cairo. Note that this script would have also created all the changes
from the previous commits to remove trailing whitespace.
2006-06-06 15:50:33 -07:00
Carl Worth
5278de0997 Remove all remaining trailing whitespace.
This patch was produced with the following (GNU) sed script:

	sed -i -r -e 's/[ \t]+$//'

run on all *.[ch] files within cairo.

Note that the above script would have also created all the changes
from the previous commits to remove trailing whitespace.
2006-06-06 15:41:31 -07:00
Carl Worth
00592e0757 Remove trailing whitespace from lines with a single brace.
This patch was produced with the following (GNU) sed script:

	sed -i -r -e '/^[ \t]*[{}][ \t]*/ s/[ \t]+$//'

run on all *.[ch] files within cairo.
2006-06-06 15:38:58 -07:00
Carl Worth
4670366ede Remove trailing whitespace from lines that look like comments.
This patch was produced with the following (GNU) sed script:

	sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//'

run on all *.[ch] files within cairo, (though I manually excluded
src/cairo-atsui-font.c which has a code line that appears as a comment
to this script).
2006-06-06 15:35:48 -07:00
Carl Worth
80b8deb1e4 Remove extraneous whitespace from "blank" lines.
This patch was produced with the following (GNU) sed script:

	sed -i -r -e 's/^[ \t]+$//'

run on all *.[ch] files within cairo.
2006-06-06 15:25:49 -07:00
Carl Worth
621ebc4726 pixman: Remove unused code to quiet compiler warnings 2006-05-15 10:16:06 -07:00
Carl Worth
636cbe5a19 pixman: Add default case to quiet compiler warning 2006-05-15 10:15:40 -07:00
Carl Worth
2e4c8924ad pixman: Fix build to enable warnings again 2006-05-15 10:07:57 -07:00
Carl Worth
450e29ce09 pixman: Remove potential memory leak in failure path.
Thanks to Petr Kobalicek <kobalicek.petr@gmail.com> for pointing this out.
2006-05-04 14:24:18 -07:00
Christian Biesinger
efbe40bb8f Use calloc rather than malloc+memset 2006-04-19 00:31:47 +02:00
Dom Lachowicz
0e44e798b5 Change cairo_image_surface_create to zero out surface contents.
This closes bug #5816:

	Image surfaces do not start out blank by default
	https://bugs.freedesktop.org/show_bug.cgi?id=5816

This also fixes all of the test suite failures introduced by moving
the CLEAR on blank page optimization up to the paginated surface from
the PS surface.
2006-04-14 16:21:16 -07:00
Laxmi Harikumar
baa3436e9d Simple fix for build failure on DEC/OSF1.
Apparently this platform also requires inttypes.h rather than
stdint.h.

This should fix the bug reported here:

        https://bugzilla.mozilla.org/show_bug.cgi?id=331428
2006-04-10 12:04:01 -07:00
Carl Worth
d6f8df7417 Remove annoyinc RCS magic lines that are not being used, but cause conflicts. 2006-03-15 10:47:09 -08:00