Commit graph

162 commits

Author SHA1 Message Date
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
Carl Worth
5d89faf6b3 fbCompositeTrans_0888xnx0888: Fix suspicious logical negation of pointer value.
Surely, the ! instead of ~ here was just a typo. I'd feel better if I
had a failing test case for this though, (time to break out gcov
again).

Fixes bug #6185:

	Strange pointer operations in fbCompositeTrans_0888xnx0888 (pixman/src/fbpict.c)
	https://bugs.freedesktop.org/show_bug.cgi?id=6185
2006-03-13 13:20:29 -08:00
Vladimir Vukicevic
f6b4fabaf5 Misc compilation fixes (C++-style comments, M_PI decls, etc.)
(cherry picked from d0cc56b9a24fa59febc15ac5de073da0e785e1cc commit)
(cherry picked from a6a054abe45287eb950c294e20366594313138f5 commit)
2006-02-27 12:22:33 +01:00
Christian Biesinger
dba214b944 Use C-style comments rather than C++-style 2006-02-26 11:13:42 +01:00
Christian Biesinger
b2912241f6 Add missing gradient functions to pixman-remap.h 2006-02-21 21:00:48 +01:00
Carl Worth
d88c19071f Rename .cvsignore to .gitignore. Add *~ and *.o. 2006-02-15 15:00:26 -08:00
Christian Biesinger
2afe78c0c2 Don't mix declarations and code. This makes the code valid ISO C, fixes a gcc -pedantic warning, and unbreaks the build with the compiler Zeta ships with. 2006-01-21 09:39:10 +00:00
Anders Carlsson
ff5207ed11 Use uint32_t instead of uint; 2006-01-09 10:29:22 +00:00
Carl Worth
19441311e4 2005-10-10 David Reveman <davidr@novell.com>
Some major performance improvements to the general composite code used for gradients and transformed images. Like fetching of mask scanline before source scanline so that only the necessary pixels from source needs to be computed in case of gradients or transformed images as source. This patch also include some gradient specific fixes and performance improvement.
2006-01-04 16:39:23 +00:00
Carl Worth
305a83721f Originally: 2005-10-10 David Reveman <davidr@novell.com>
Add entries for gradient support.
Add PictureGradientColor.
Add necessary functionality for gradient support.
Enable gradient support.
2006-01-04 16:26:10 +00:00
Carl Worth
9becae35c0 Remove dead code from cairo-meta-surface: vestiges of meta-surface backend implementations of composite, fill_rectangles, composite_trapezoids, set_clip_region, and old_show_glyphs. 2005-12-14 16:45:39 +00:00
Carl Worth
9e7076fd27 Remove duplicate definitions of pixman_color_to_pixel and pixman_composite. 2005-11-21 11:46:40 +00:00
Carl Worth
345ba540b1 Remove spurios INT_ prefixes which break the build with very recent binutils. 2005-11-18 09:15:43 +00:00
Billy Biggs
bb86d6664d Make space for the new bits needed by expand. 2005-10-09 14:29:54 +00:00
Billy Biggs
32eb6ce206 Add extended repeat modes, copied from XRender.
Cleanup to use the new repeat modes.
Be explicit about which repeat mode we want.
reviewed by: davidr, cworth, otaylor
2005-10-09 09:09:53 +00:00
Billy Biggs
759166f795 Only include xmmintrin.h if USE_SSE is defined. 2005-09-18 19:52:08 +00:00
Billy Biggs
b7c02401b9 Bug #4414, reviewed by otaylor, cworth.
Remove CPU detection code.
Move CPU detection code out of the MMX file and into the generic code to avoid compiling it with -mmmx and -msse. Using these options causes gcc to use MMX and SSE instructions in the CPU detection code which causes SIGILLs on older processors.
2005-09-18 19:34:36 +00:00
Owen Taylor
a1bca924b9 Bug #4260, Reviewed by B. Biggs
Use & not && for bitwise AND.
src/fbpict.c src/fbmmx.c: Take 'dest' as an argument, if pict and dest don't match for RGB, BGR, swap result.
2005-09-12 05:55:11 +00:00
Carl Worth
0b9c0efc3a Put win32 mutex locking on the 1.2.0 roadmap.
Portability improvements for win32 thanks to Hans Breuer <hans@breuer.org>:
Defined sized-integer types when under the influence of _MSC_VER and without stdint.h.
Use #error which is more portable than #warning, (and more indicative of where we want to be before the next release).
2005-09-07 16:57:59 +00:00
Owen Taylor
2120864edf Use local labels rather than global labels in the assembly, to be robust if the code is inlined in multiple places. (#4283, Reported by Marco Manfredini) 2005-08-28 12:52:10 +00:00
Billy Biggs
a83537fe02 Some fixes for warnings from sparse (Part of bug #4208, Kjartan Maraas)
Use NULL not 0.
2005-08-27 19:32:57 +00:00
Owen Taylor
c0da73e1b8 Make the code work with
-fomit-frame-pointer by making sure that %esp isn't modified at the point where we access output operands. (#4269, Patch from Ronald Wahl)
2005-08-27 18:36:09 +00:00
Owen Taylor
2ea856a21d When width/height are 0, copy the src to the dest, don't just return. (#3017) 2005-08-22 12:15:28 +00:00
Billy Biggs
89a4e13d73 Fix a typo in the last change. 2005-08-21 21:02:32 +00:00
Billy Biggs
16ce285251 Remove warning about fbCompositeTrans_0888xnx0888 not being tested on big-endian, it's not helpful at this point.
Only define _cairo_pixman_have_mmx for fbHaveMMX when the symbol will actually exist.
2005-08-21 20:49:47 +00:00
Billy Biggs
f823dfd932 Fix for bug #4140:
Dereference the pixel value correctly on big endian systems.
2005-08-20 21:28:57 +00:00
Billy Biggs
d809e82980 Special case alpha values of 0 and 0xff. (fbCompositeSrc_8888x8888mmx): Add an MMX implementation for a common operation when using pixman.
Prototype for the new function.
Call the new function where appropriate.
2005-08-18 19:13:06 +00:00
Billy Biggs
f5afeec18a Special case projective transforms so we can avoid doing the expensive 64-bit math. Unroll the bilinear interpolation loops for an extra boost. 2005-08-18 18:46:30 +00:00
Billy Biggs
24ba58e7f5 For the source operator, the output should be cleared if the mask is zero. This fixes the MMX code to match the fbcompose code.
Fix a logic mistake that caused the MMX functions not to be used in many cases.
2005-08-18 06:01:40 +00:00
Billy Biggs
4ebe0b63cc Only mangle exported symbols. This is sufficient and makes debugging a lot easier. 2005-08-17 21:14:02 +00:00
Billy Biggs
c892ee36d9 Fix a typo in the last commit. 2005-08-16 19:54:05 +00:00
Billy Biggs
0398085a6f Split the MMX code into a separate libtool library to avoid applying the MMX CFLAGS to all of the pixman code. Idea and code from Owen Taylor.
Update the mangling header file to include the MMX symbols.
2005-08-16 18:38:38 +00:00
Billy Biggs
9ae7d8a13b Port MMX code from xserver to pixman.
Add an fbpict.c ported from the latest in xserver/fb, including hooks to the MMX code where appropriate. This replaces the old ic.c file.
Replaced by fbpict.c.
Move some X server macros from fbpict.c up into icint.h to keep the diff small.
Add fbmmx and fbpict.c, remove ic.c.
Add a check for the MMX intrinsics. gcc >= 3.4 is required.
2005-08-16 16:50:25 +00:00
Billy Biggs
027157feb6 Fix to be correct for arbitrary xDst values. 2005-08-11 21:07:26 +00:00
Billy Biggs
b25c1203d8 Add support for filling 1bpp images (used to clear A1 masks). 2005-08-10 22:03:00 +00:00
Billy Biggs
910d824b3d Port fbcompose.c from xserver into pixman. Add #defines for gradients, convolution filters, and indexed colour formats to keep the patch small. Use pixman regions instead of X server regions as appropriate.
Remove iccompose.c, replaced by fbcompose.c.
Add a slightly-trimmed version of fbpict.h from xserver/fb to make the port smaller and cleaner.
Use the redundant fbpict.h defines and add in the struct for indexed colour support.
Remove defines now in fbpict.h.
Add some constants and types required by fbcompose.c
Add fbcompose.c and fbpict.h, remove iccompose.c.
reviewed by: cworth and Jeff Muizelaar at various stages
2005-08-10 21:10:11 +00:00
Keith Packard
a05fcce165 Union with empty rectangle should yield SUCCESS, not FAILURE 2005-08-10 13:27:48 +00:00
Carl Worth
0fc4192104 From Keith Packard <keithp@keithp.com>,
Build pixman internally as a private part of cairo, with suitable name changes to avoid any visible pixman symbols in the cairo library:
Descend into pixman.
Drop libpixman from Requires.
Don't check for libpixman. Check version of pkg-config and use Requires.private instead of Requires in cairo.pc if possible. Generate pixman Makefiles.
Rip out release-publish target and installation of libpixman.pc.
Add pixman-remap.h. Drop libpixman.la target.
Fix to include config.h rather than ../config.h
This is the cpp magic to rename all pixman functions from the various fb, Fb, INT_pixman, pixman, Render, _Render, or no prefix to _cairo_pixman_ prefixes.
Include pixman-remap.h to get all the cairo-internalized names.
Add -Ipixman/src to get at pixman-remap.h.
2005-08-10 12:36:51 +00:00
Jeff Muizelaar
de87ebcc1c Fix problems in render fb implementation found by rendercheck:
- fbCombineSaturate was pointed at fbCombineDisjointOver, instead of fbCombineDisjointOverReverse as it should. Instead, point fbCombineDisjointOverReverse at fbCombineSaturate (which is likely to be faster).
- fix previously-unused fbCombineSaturate implementation.
- fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC. Make it do what it's supposed to (return a cs.alpha).
- fbCombineAtopC didn't invert the source alpha value.
- fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also source alpha wasn't treated in a component fashion.
From anholt.
2005-08-05 22:17:08 +00:00
Jeff Muizelaar
71e560a8fa Temporarily disable the 24bpp WORKING_UNALIGNED_INT because of a crash when using electric-fence when accessing hte last pixel of a drawable (last pixel is 3 bytes, read it as a 4 byte word, and you're reading one extra pixel, which doesn't normally matter, but does in a few rare cases). Should be easy to work around, but that will come later.
From jaymz
2005-08-05 21:35:51 +00:00
Jeff Muizelaar
ec93e241b0 Fix fbGetDrawable
Patch from Billy Biggs <vektor@dumbterm.net>.
2005-08-05 12:26:33 +00:00
Jeff Muizelaar
3ef2488265 Fix some of the 4 bit per channel PICT definitions
Patch from Billy Biggs <vektor@dumbterm.net>.
2005-08-05 12:14:12 +00:00
Jeff Muizelaar
2b20b7a230 Fix up the fast-path compositing operators; those are useful for sources without alpha, but can't be used for sources with alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would be nice to optimize fbBlt for common cases involving 8, 16, 24 and 32bpp.
From Keith Packard.
2005-08-05 11:44:49 +00:00
Billy Biggs
ba87f1324f Optimize spans where the same value is being added to multiple pixels. This improves the speed of rasterizing wide trapezoids.
Add an INLINE macro that matches the one from fbpict.h in xserver/fb.
2005-08-01 18:01:24 +00:00
Jeff Muizelaar
05d84a0a1e Finish up merging the optimization work from jaymz. 2005-07-30 10:23:21 +00:00
Jeff Muizelaar
bdfb7f4db0 s/uint(8|16|32)_t/CARD(8|16|32)/ 2005-07-30 09:43:51 +00:00
Jeff Muizelaar
5ebf2c5d96 Add some optimizations from jaymz. Also adds some compile warnings that will hopefully go away as we continue merging. 2005-07-30 08:48:25 +00:00