summaryrefslogtreecommitdiff
path: root/pixman
AgeCommit message (Collapse)AuthorFilesLines
2007-07-02Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/cairoSøren Sandmann Pedersen3-3149/+0
Conflicts: pixman/src/fbcompose.c pixman/src/icimage.c pixman/src/pixmanint.h pixman/src/pixregionint.h src/cairo-clip.c
2007-06-29[fix] Avoid int overflow when allocating large buffersVladimir Vukicevic6-18/+78
This patch introduces three macros: _cairo_malloc_ab, _cairo_malloc_abc, _cairo_malloc_ab_plus_c and replaces various calls to malloc(a*b), malloc(a*b*c), and malloc(a*b+c) with them. The macros return NULL if int overflow would occur during the allocation. See CODING_STYLE for more information.
2007-06-21[pixman] Initial port to standalone pixman library.Søren Sandmann50-20873/+0
2007-06-18[perf] Add pixman_region_init_rects and use in extract_regionVladimir Vukicevic3-0/+32
Avoid O(N*N) loop in traps_extract_region by letting us hand pixman an array of rects all at once.
2007-06-11[misc] Blow away last remaining $Id$ directives in sourcesVladimir Vukicevic1-2/+0
2007-05-16[pixman] Propagate allocation failure.Chris Wilson1-7/+17
pixman_op() failed to propagate the failure from pixman_region_appendNonO() and the generic op.
2007-05-03[pixman] Free the old rects if we fail to allocate new.Chris Wilson1-2/+6
During the pixman_op, a complicated dance is performed to handle enlarging the rectangle array to accommodate the op. One consequence of this is to, under certain circumstances, replace the current rectangle array with emptyData and track the old array with oldData. Hence if we fail to realloc the enlarged array we need to free oldData.
2007-04-28pixman.h: Add missing definition of WARN_UNUSED_RESULTCarl Worth1-0/+3
This was breaking the build on systems without support for the __warn_unused_result__ attribute.
2007-04-25Fix bugs in fbCompositeSrc_8888x8x8888mmx and fbCompositeSrc_x888x8x8888mmxJeff Muizelaar2-16/+12
And re-enable fbCompositeSrc_8888x8x8888mmx now that it should work. This gives another little boost to the paint-with-alpha perf test: image-rgba paint-with-alpha_image_rgba_over-512 11.76 -> 5.20: 1.85x speedup ▉ image-rgb paint-with-alpha_image_rgba_over-512 11.76 -> 5.26: 1.84x speedup ▉
2007-04-25Allow fbCompositeSrc_x888x8x8888mmx when destination has alphaCarl Worth1-1/+7
Previously the check for this optimized function would only allow the function to be called if the source and destination had identical formats. But the function doesn't read the destination alpha (if any) so can be used when it exists as well. (Thanks to Jeff Muizelaar for pointing out this problem.)
2007-04-20[pixman] Fix typo in Makefile.amBehdad Esfahbod1-1/+1
2007-04-18Put back __inline definition for MSC compilers, in both cairo and pixmanBehdad Esfahbod1-2/+8
Apparently it's too much to expect people compiling on windows to fill in sensible values for config.h... /sigh
2007-04-18[pixman] Rename icint.h to pixmanint.hBehdad Esfahbod24-75/+1110
2007-04-12[pixman] Mark some small functions that are called per-pixel inlineBehdad Esfahbod1-3/+3
These uses were introduced in the previous commit.
2007-04-12[pixman] Fix fbcompose.c that was broken for some composite operations (#5777)David Reveman1-93/+151
2007-04-12Move pixman_format_t from heap to stack allocations.Chris Wilson6-234/+160
pixman_format_t is a simple structure used in short-term allocations and suitable for on-stack allocation. Killing the pixman_format_create()/pixman_format_destroy() pairs avoid around 6% of the allocations during cairo-perf (e.g. 426,158 allocs out of a total of 7,063,469).
2007-04-11Only enable warn-unused-result for recent gccChris Wilson1-3/+7
The attribute was introduced with gcc-3.4, but the ability to suppress warnings from misapplied attributes (-Wno-attributes) was only introduced later. Without the supression, gcc will emit tens of warnings for each compilation completely drowning the real errors that the programmer must see.
2007-04-11_pixman_create_source_image() - check for malloc failureChris Wilson1-0/+2
Fix an unchecked malloc by propagating the NULL pointer up to its callers, which were already checking for failures.
2007-04-11Unexport fbSolidFillmmx and fbCopyAreammx.Chris Wilson3-134/+101
By unexporting these function we have exact control over their call sites and so can convert the initial guards into asserts which transforms the two functions to return unconditional success and hence conversion to void.
2007-04-11Propagate errors up through pixman_composite_trapezoids()Chris Wilson2-17/+22
Change the return type to indicate errors detected during pixman_composite_trapezoids() and add checking for failures during region ops.
2007-04-11Propagate region errors from pixman_color_rects().Chris Wilson2-21/+57
Region operations within pixman_color_rects can fail, so cleanup and propagate.
2007-04-11FbClipImage* should check for errors during region operations.Chris Wilson1-4/+14
Propagate the error from pixman_region_intersect().
2007-04-11Propagate region failures during pixman_image_set_clip_region().Chris Wilson1-3/+12
Operating on regions can fail so check the status and return an error, after any necessary cleanup.
2007-04-09Add attribute(warn_unused_result)Chris Wilson2-2/+3
This adds a compiler check that the function result is used by the caller and enables it by default for all cairo_private functions and for public API that returns a cairo_status_t. It has been discussed that to extend the warnings to all functions, a new function type could been introduced to cover static functions: cairo_static. This has not been done at the present time in order to minimise the churn and focus on the more common errors. In order to reduce the warning spew generated by gcc for invalid use of this attribute, -Wno-attributes is added to CFLAGS. This has the unfortunate side-effect of masking future warnings for all attributes - be warned!
2007-04-08Rename pixman_region_uninit to pixman_region_finiBehdad Esfahbod8-13/+13
2007-04-08[pixman-image] Simply initialization given that there is no clipBehdad Esfahbod1-23/+9
2007-04-08[pixman-region] Separate pixman_region_initMathias Hasselmann8-44/+49
Most of the time pixman_region_init is called without any extents, and followed by a pixman_region_union_rect, used to used to initialize rectangular regions. pixman_region_union_rect is not that cheap, but the sequence is called quite often. So it should be worth introducing a specialized and fast function for this sequence. This introduces pixman_region_init_rect. This new function makes _cairo_region_init_from_rectangle obsolete. Also removes the extent argument from pixman_region_init as it was called with NULL most of the time. A pixman_region_init_with_extents is added for the general case.
2007-04-08Update function mapMathias Hasselmann1-3/+2
2007-04-08Remove abdoned pixman_region_{create,destroy}Mathias Hasselmann2-31/+0
2007-04-08Make clientClip region static, remove abdoned CT_PIXMAP code pathsMathias Hasselmann3-203/+9
2007-04-08Avoid pixman_region_create in pixman_composite{,General}Mathias Hasselmann3-84/+48
2007-04-08Make clip regions of pixman_image_t staticMathias Hasselmann4-78/+96
2007-04-08Avoid pixman_region_create in pixman_color_rectsMathias Hasselmann1-16/+16
2007-04-08Replace pixman_region_create_simple by pixman_region_initMathias Hasselmann3-22/+8
2007-04-08Make pixman_region_{init,uninit} publicMathias Hasselmann2-12/+11
2007-04-08Move struct pixman_region16 to pixman.hMathias Hasselmann2-7/+7
2007-04-04Restore gcov functionalityChris Wilson1-1/+4
Add -lgcov to the shared library else the test programs fail to link. Add a couple of lcov convenience targets to generate the coverage reports.
2007-04-03[pixman/src/check-config.sh] Test that all source files #include <config.h>Behdad Esfahbod2-0/+20
as their first include.
2007-04-03[pixman] Make sure all source files include config.hBehdad Esfahbod15-0/+55
as their first include.
2007-04-03[pixman] Cleanup inline mess (#10150)Behdad Esfahbod7-55/+46
Simply use "inline" instead of "INLINE" or "__inline__" and let configure figure out what to use.
2007-03-20[configure.in] Define PIXMAN_CFLAGS, to pass -fno-strict-aliasing to pixmanBehdad Esfahbod1-3/+1
2007-03-16Don't use unsupported visibily attribute hidden on SolarisGilles Dauphin1-1/+1
Thanks to Thomas Klausner for passing the report along. This fixes the following bug report: hidden attribute does not work with Solaris ld https://bugs.freedesktop.org/show_bug.cgi?id=10227 And as Behdad points out, an even better fix would be to move checks for supported visibility attribute to configure.
2007-03-01Fix gradient walker to not reset needlesslyCarl Worth1-7/+10
Previously the gradient walker was doing excessive resets, (such as on every pixel in constant-colored regions or outside the gradient with CAIRO_EXTEND_NONE). Don't do that.
2007-03-01Fix implementation of radial gradients for inner radius != 0Carl Worth4-67/+165
The previous implementation fell apart quite badly when neither radius value was equal to 0.0. I derived the math from scratch, (much thanks to Vincent Torri <vtorri@univ-evry.fr> for guiding me to a simpler derivation than I was doing originally), and it's working much better now without being any slower, (in fact, cairo-perf shows speedup of 1.05x to 1.58x on my laptop here). This work also provides groundwork for defining the behavior of radial gradients where neither circle is wholly contained within the other, (though we haven't done that definition yet---it will require a new test case and a very little bit of work on the implementation). This is a fix for the following bug report: Radial Gradients with nonzero inner radius misplace stops https://bugs.freedesktop.org/show_bug.cgi?id=7685
2007-03-01Rename radial gradient inner/outer to c1/c2Carl Worth2-8/+8
The inner/outer names were totally bogus. It is quite legitimate to have the first circle's radius be larger than that of the second.
2007-02-13Update Win32 makefilesDan Amelang1-0/+2
Since the last time these makefiles were last updated some new source files have been added and one renamed. In addition, a "clean" rule needed to be added to the pixman makefile. And the "clean" rule in the main cairo makefile wasn't working properly for me.
2007-02-06Apply patch from Marco Gritti and Jordan Crouse to correctly detectSoren Sandmann Pedersen1-1/+3
AMD CPU's. Bug 9615.
2007-02-06Remove left-over assert and some alpha checks fromSoren Sandmann Pedersen1-39/+13
fbCompositeSrc_8888x0565mmx(). Bug 9893.
2007-02-02fixing gradient repeat mode computationsDavid Turner1-2/+4
This fixes the regression of linear gradient as demonstrated by the recently added linear-gradient-reflect test.
2007-01-25[mmx] avoid casts between int32 and __m64 typesVladimir Vukicevic1-6/+4
The MS compiler doesn't like this; _mm_cvtsi32_si64 and _mm_cvtsi64_si32 must be used.