Commit graph

8816 commits

Author SHA1 Message Date
Chris Wilson
a48eccbf77 configure: Fix typo "(requires both --enable-xcb)" 2010-09-07 13:58:29 +01:00
Chris Wilson
faeb6caaeb version: 1.10.1 open for bugfixing 2010-09-06 18:40:27 +01:00
Chris Wilson
cb0bc64c16 version: 1.10.0 *release*
/me faints with excitement.
2010-09-06 17:15:51 +01:00
Chris Wilson
87fad10464 NEWS: Sum up 2 years of development for 1.10.0 in 60 lines 2010-09-06 17:14:41 +01:00
Chris Wilson
04623ef9df test: Add subsurface-outside-target refs to REFERENCE_IMAGES 2010-09-06 13:15:55 +01:00
Chris Wilson
d5b2c2a12e test: Rename clip-fill-*-unbounded.image16 ref to match REFERENCE_IMAGES 2010-09-06 13:11:22 +01:00
Chris Wilson
cab9682f9d check: Ignore the documentation errors.
Currently it is complaining about having documentation for
unconfigured sections, ignore it for now.
2010-09-06 13:11:22 +01:00
Chris Wilson
8127f1f5d5 Bump pixman requirements to 0.18.4 for assorted fixes. 2010-09-06 13:11:22 +01:00
Chris Wilson
21a2f90cde check: Make the actual error stand out 2010-09-06 13:11:22 +01:00
Chris Wilson
8258532794 Reduce the cairo_device_type_t to only hold the used entries.
This should help clarify the documentation by not mentioning non-existent
devices and prevent any assumed coupling between surface-type values and
devices.
2010-09-06 13:11:22 +01:00
Chris Wilson
e3afbc1875 check: Fix for link-time-optimisation 2010-09-06 13:11:21 +01:00
M Joonas Pihlaja
a9e055ff48 freelist: Separate freelist inlines from the datatype in headers.
The cairo-freelist-private.h header has a number of static inline
functions which call hidden functions in libcairo.  This poses
a problem on Solaris where the native compiler compiles inline
functions whether they are used or not, thereby adding the
link time requirements on hidden functions from whatever code
that includes cairo-freelist-private.h.  Unfortunately the
boilerplate code includes cairo-private headers and indirectly
the freelist header, so linking the boilerplate helper library
fails on Solaris.

This patch separates the structure definitions from the function
prototypes and static inlines in cairo-freelist-private.h by moving
the datatypes to a new cairo-freelist-type-private.h.
2010-09-02 14:51:30 +01:00
M Joonas Pihlaja
f5632d641c build: Remove stray backslash.
A stray backslash bwetween two assignment lines apparently
invokes a GNU make extension for conditional assignments.
This patch fixes the build when using the native Solaris make.
2010-09-02 13:55:55 +03:00
Benjamin Otte
3a8b8fcc2a gobject: Fix header defines 2010-09-01 21:14:40 +02:00
Benjamin Otte
54a651564c build: Work around caching not reevaluating uncached variables
This is a somewhat crude hack to ensure that GOBJECT_CFLAGS/LIBS are
properly cached.
2010-09-01 18:47:16 +02:00
Benjamin Otte
28ba78a971 gobject: Fix pkgconfig file variable
I confused % and $. I blame it on spec files.
2010-09-01 18:46:46 +02:00
Benjamin Otte
61a1835e40 subsurface: Fix acquire_source_surface for out-of-bounds surfaces
See subsurface-outside-target test.
2010-09-01 03:17:12 +02:00
Benjamin Otte
f54c51e75c test: Add subsurface-outside-target
This test defines the behavior of subsurfaces when they are created to
be bigger than their target.
2010-09-01 03:16:22 +02:00
Maarten Bosmans
6eab5ee10c build: prefer libpng14 over older versions
Also move libpng to the front of the list, so that the default
version of the system is first checked.
2010-08-29 08:12:12 +03:00
M Joonas Pihlaja
9f98ec6eb9 device: Refer the user to per-backend docs about devices.
The exact semantics of the device API can't be spelled out
out in the device API docs since the effects are so tied
to the specific backend.  To use a particular device in
practice the user should refer to the backend docs.
2010-08-29 00:05:51 +03:00
M Joonas Pihlaja
b0f65054b8 subsurface: Add a note to the docs about usage restrictions.
Make our assumptions about constructed subsurfaces explicit
while we work out the correct semantics for the edge cases.
2010-08-29 00:03:07 +03:00
Benjamin Otte
92fe2d370d surface-offset: Use right variable in mask
Use source/mask instead of their copies. The copies only get initialized
if we actually need to translate things.
2010-08-28 17:13:46 +02:00
M Joonas Pihlaja
df4b23ff74 subsurface: Fix crash when acquiring a source image.
The code is passing in the extra info received from
the target surface's acquire_source() method to
_cairo_surface_get_extents() rather than the acquired
source surface itself.
2010-08-27 20:26:06 +03:00
Andrea Canciani
2d146867dc subsurface: Correct cloning condition
72644c6df2 was using the wrong (inverted)
condition to check if the subsurface extents are contained in the
target extents.
2010-08-26 14:50:34 +02:00
Andrea Canciani
72644c6df2 subsurface: Avoid invalid accesses
Whenever subsurface extents are not contained in the target extents,
using the source image given by the target (with origin corrected by
using an appropriate offset in the data pointer) is not a valid
operation. Fallback to cloning in that case.
2010-08-26 14:38:34 +02:00
Andrea Canciani
df4465bdd1 subsurface: Silence compiler warnings
Commit d1c35f5e65 introduced two
unused variable warnings.
2010-08-26 14:23:04 +02:00
Benjamin Otte
d1c35f5e65 subsurface: Don't clip size to target size
This clipping would modify the origin of the subsurface and then the
creator has no easy way to figure this out.
2010-08-26 13:55:02 +02:00
Benjamin Otte
174fb5f16f subsurface: Don't apply device transform twice for source/mask 2010-08-26 13:21:04 +02:00
Benjamin Otte
e79acf47a5 subsurface: Make CAIRO_SURFACE_TYPE_SUBSURFACE public 2010-08-26 12:55:39 +02:00
Benjamin Otte
40459dacb5 subsurface: Don't crash when the device transform isn't integer
Apply the transform before rounding to integer coordinates, so we can
handle doubles easily.
2010-08-26 11:45:28 +02:00
Benjamin Otte
e19b213e84 subsurface: Make subsurfaces their own type
Do not try to hide being a subsurface.
This would cause confusion when users where calling surface-type
specific getters on subsurfaces.

FIXME: We still need public API to access a subsurface's target though.
2010-08-26 11:20:36 +02:00
Benjamin Otte
e65bf64c4a subsurface: Properly account for device offsets in the target 2010-08-26 11:20:36 +02:00
Chris Wilson
8e9c4ea589 Mark the context as invalid on the final cairo_destroy()
We initialise the context to a non-error state upon creation, but after
destroy there is a window of opportunity where the object is kept alive
inside the context pool and the user could mistakenly keep on passing
the zombie context into cairo functions. As all entry points need to
check error status, flagging the context as an error object upon the
final unreference prevents such misuse (until such as time as the
context is reallocated).
2010-08-11 12:18:53 +01:00
Andrea Canciani
cd52378ae6 test: Update linear-gradient-large ref image
Make linear-gradient-large ref image match xlib gradients (both on nvidia
and on macosx) and pixman gradients (when patched to compute the linear
gradients using floating point math).
2010-08-10 19:42:14 +02:00
Krzysztof Kosiński
a7762e3d65 tests: Add linear-gradient-large test
Shows large rounding errors in Pixman when computing gradients. Added as
a test to Cairo to catch similar issues in other backends.

https://bugs.freedesktop.org/show_bug.cgi?id=29470
2010-08-10 18:38:59 +02:00
Andrea Canciani
56ea51fdcc Replace insertion sort with mergesort in the scan converter
Insertion sort can take up to O(n^2), mergesort is guaranteed to run
in O(n*log(n)).
An example showing bad performance for insertion sort is:
   https://bugs.freedesktop.org/show_bug.cgi?id=28067

The mergesort has been engineered to be fast even when working on
cases where the insertion sort would have performed well and as
expected it shows no changes in the benchmark cairo traces.
2010-08-10 14:39:54 +02:00
Nicolaus L Hepler
a150371a5d ft-font: Make alpha mapping consistent
Vertical RGB mapping previously forced opaque pixels.
To be consistent with horizontal RGB/BGR and vertical BGR it
should use an alpha equal to the mid channel (green).
2010-08-10 09:40:46 +02:00
David Schleef
73470862cb perf: Fix README to say cairo-perf-micro 2010-08-10 02:37:38 +02:00
Benjamin Otte
df8f964234 build: Fudge the build system some more so it handles extra libs
Add NONPKGCONFIG_EXTRA_LIBS that are only put into the generated pc file
but not used when linking. This is now used to add -lcairo-gobject to
the cairo-gobject.pc file.
2010-08-10 01:24:30 +02:00
Benjamin Otte
01325ad767 gobject: Include the extra library in the pkgconfig file 2010-08-10 00:11:59 +02:00
M Joonas Pihlaja
8fb91dc3f6 script: Fix script backend build.
The flight data recorders were missing an include
of cairo-tee.h ever since cairo-tee.h became an optional
backend.
2010-08-10 00:53:53 +03:00
Andrea Canciani
7668323649 perf: Improve calibration
Make the loops count depend on the actual calibration_loops/calibration_time
instead of calibration_loops/calibration_max_time.
This avoids having some tests take much less/more than the wanted time per iteration
(I was having some tests taking about 1 second, other taking about 7 seconds when
the ms_per_iteration was 2000)

Spend 0.5-1 times the time wanted for each iteration in calibration, increase the
accuracy of loops count. Just making the loops count be the correct ratio doesn't
guarantee that the iteration time is accurate. By actually measuring iteration
times until it gets greater than 1/4 of the wanted time, the total sum is bound
to be <= the wanted iteration time and last calibration time is between 1/4 and
1/2 of the wanted time, so it should give a very accurate loop count.
2010-08-09 19:19:04 +02:00
Rich Walsh
046b642db0 os2: Restore surface type checking in the get_extents method. 2010-08-08 22:33:43 +03:00
Rich Walsh
78bdd87b75 os2: Fix clipping to bounds when blitting pixels.
The bounds checks on the rectangle to blit were done
after converting target/source to inclusive/noninclusive
coordinates rather than before, potentially causing an
off-by-one in the sizes, since the same logic was applied
to both inclusive and non-inclusive coordinates.  This
patch enforces bounds up front.

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:40 +03:00
Rich Walsh
d0284687b3 os2: Tweak an inline declaration.
C99 and cairo prefers "static inline <return type>" rather
than "static <return type> inline".

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:40 +03:00
Rich Walsh
cb30340064 os2: Consolidate error paths of cairo_os2_surface_create().
Use a single code path to release the resources acquired
for a surface that's been partially constructed, rather than
have multiple error exits which each release the resources
acquired so far.

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:40 +03:00
Rich Walsh
66e3d650fe os2: Document ownership of OS/2 objects passed to surfaces.
Clarify the documentation for cairo_os2_surface_create()
and cairo_os2_surface_set_hwnd() to note that the ownership
of the presentation space and window respectively
remains with the caller.

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:40 +03:00
Rich Walsh
0152527154 os2: Don't fake an Anchor Block when one isn't needed.
The code was being tricky about passing in a HAB to
DevOpenDC() even though one isn't needed at all under
OS/2.  Pass in NULL instead.

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:40 +03:00
Rich Walsh
883d9725e0 os2: Fix buffer allocator behaviour on arithmetic overflow.
On arithmetic overflow the buffer allocator would attempt
to allocate zero bytes instead of failing the allocation.
Depending on the implementation of the underlying allocator
being proxied, this may result in an allocation of a zero
length buffer, causing all kinds of grief.  This patch
causes arithmetic overflows to explicitly fail the allocation.

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:40 +03:00
Rich Walsh
b54037828c os2: Fix blitting 24 bpp pixel data.
There's a format mismatch between cairo's pixel formats
and OS/2 24 bpp data: the individual pixels in OS/2 take
only three bytes per pixel, but there needs to be padding
between lines to make the start of a line always be aligned
at a DWORD boundary.

This patch fixes the format conversion code to include
the required padding between rows.

Thread "OS/2 surface fixes" on cairo-l:
http://lists.cairographics.org/archives/cairo/2010-July/020343.html
2010-08-08 22:29:39 +03:00