Age | Commit message (Collapse) | Author | Files | Lines |
|
Conflicts:
pixman/src/fbcompose.c
pixman/src/icimage.c
pixman/src/pixmanint.h
pixman/src/pixregionint.h
src/cairo-clip.c
|
|
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.
|
|
|
|
Avoid O(N*N) loop in traps_extract_region by letting us hand pixman
an array of rects all at once.
|
|
|
|
pixman_op() failed to propagate the failure from
pixman_region_appendNonO() and the generic op.
|
|
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.
|
|
This was breaking the build on systems without support for the
__warn_unused_result__ attribute.
|
|
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
▉
|
|
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.)
|
|
|
|
Apparently it's too much to expect people compiling on windows to fill
in sensible values for config.h... /sigh
|
|
|
|
These uses were introduced in the previous commit.
|
|
|
|
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).
|
|
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.
|
|
Fix an unchecked malloc by propagating the NULL pointer up to its callers,
which were already checking for failures.
|
|
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.
|
|
Change the return type to indicate errors detected during
pixman_composite_trapezoids() and add checking for failures during
region ops.
|
|
Region operations within pixman_color_rects can fail, so cleanup and
propagate.
|
|
Propagate the error from pixman_region_intersect().
|
|
Operating on regions can fail so check the status and return an error,
after any necessary cleanup.
|
|
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!
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
as their first include.
|
|
as their first include.
|
|
Simply use "inline" instead of "INLINE" or "__inline__" and let
configure figure out what to use.
|
|
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
AMD CPU's. Bug 9615.
|
|
fbCompositeSrc_8888x0565mmx(). Bug 9893.
|
|
This fixes the regression of linear gradient as demonstrated
by the recently added linear-gradient-reflect test.
|
|
The MS compiler doesn't like this; _mm_cvtsi32_si64 and _mm_cvtsi64_si32
must be used.
|