Commit graph

3495 commits

Author SHA1 Message Date
Chris Wilson
bf62798b12 [cairo-compiler-private.h] Divert popen to _popen for MSVC
Microsoft uses _popen instead of popen - required to build the
boilerplate but not actually used on Windows (by default)!
2008-09-10 18:21:50 +01:00
Behdad Esfahbod
5e5a2b9da7 More fixes for pkgconfig files
Should all work now.
2008-09-10 12:41:57 -04:00
Behdad Esfahbod
9dd9289c4a Rename cairo-backend.pc.in to cairo-features.pc.in 2008-09-10 12:18:27 -04:00
Behdad Esfahbod
87dfceb9ec [Makefile.am] Rename INCLUDES to AM_CPPFLAGS
Fixes automake warnings
2008-09-08 15:13:07 -04:00
Chris Wilson
d478b3e1ef [cairoint.h] Update LAST_STATUS. 2008-09-07 18:31:29 +01:00
Chris Wilson
7960fc94dc [ps] Set used level to 3 only if we use native gradients.
Set the used level after performing the checks that the native Type2/3
gradients support the pattern.
2008-09-07 15:03:58 +01:00
Chris Wilson
7439c45039 [ps] Only use fallback images if the gradient has non-constant alpha.
If the gradient has constant alpha, then we can express it as a flattened
linear gradient. Otherwise, should the opacity vary across the gradient we
need to fallback.
2008-09-07 15:03:47 +01:00
Chris Wilson
a33f2f6962 Revert "[ps] A flattened gradient is not linear."
This reverts commit 85ed37da33.

Adrian Johnson pointed out that iff the gradient has constant alpha then
it can be flattened. Reverting this commit in order to restore the
capability to handle gradient flattening.
2008-09-07 15:03:21 +01:00
Chris Wilson
1a6f2b08a1 [ps] Support B PDF operator.
Add the procedure definition for fill-stroke path operators, B and B*.
2008-09-07 15:02:21 +01:00
Chris Wilson
ab3bb369d5 [ps] Add comments about design of output.
Add some snippets from Adrian Johnson about how and why the PS output is
factored in terms of PDF operators.
2008-09-07 15:02:15 +01:00
Chris Wilson
d45b3168db [ps] Use a color_t rather than open-code.
Simplify the code by tracking the current solid color with a
cairo_color_t.
2008-09-06 09:10:30 +01:00
Chris Wilson
85ed37da33 [ps] A flattened gradient is not linear.
We cannot express an alpha-gradient as a simple linear interpolation
between 2 flattened colors. So fallback.
2008-09-06 09:10:25 +01:00
Chris Wilson
c1c86afa87 [ps] Use floating point values when flattening color.
Use the full-precision color values when computing the alpha-blended
color.
2008-09-06 09:10:20 +01:00
Chris Wilson
e583fb061d [type1] Allocate the temporary subsetter on the stack.
Avoid a reasonably small, short-lived malloc by allocating the
cairo_type1_font_subset_t on the stack.
2008-09-06 08:14:43 +01:00
Behdad Esfahbod
7ad076442d Rename src/*.mk to src/Makefile.*
Namely:

	src/Sources.mk      -> src/Makefile.sources
	src/Config.mk       -> src/Makefile.am.config
	src/Config.mk.win32 -> src/Makefile.win32.config
2008-09-04 22:23:42 -04:00
Behdad Esfahbod
37f82a4d1b Get rid of CAIRO_LDADD in favor of CAIRO_LIBS 2008-09-04 16:13:05 -04:00
Behdad Esfahbod
44155f7e59 Cleanup configure.in macros 2008-09-04 16:08:41 -04:00
Behdad Esfahbod
097c4ac022 [Makefile.am] Use check_PROGRAMS 2008-09-03 20:52:17 -04:00
Behdad Esfahbod
b1ced45f06 [doc] Fix out-of-tree build 2008-09-03 20:52:12 -04:00
Vladimir Vukicevic
2cf4b3161c [quartz] move _cairo_quartz_create_cgimage to cairo-quartz-surface.c 2008-09-03 15:34:40 -07:00
Behdad Esfahbod
99e2e2d0bb [src/Makefile.am] Minor fix in MAINTAINERCLEANFILES 2008-09-03 12:06:35 -04:00
Behdad Esfahbod
2791d51f6e [src/README] Refer to BIBLIOGRAPHY 2008-09-03 11:41:41 -04:00
Chris Wilson
8992312df0 [scaled-fonts] Cleanup a couple of valgrind warnings.
Beware the propagation of uninitialised variables and forgotten error
codes.
2008-09-03 16:33:49 +01:00
Chris Wilson
3b7726e3d4 [src/Makefile.am] s/libcairo_la_CFLAGS/INCLUDES/
Update the custom rules after the overall to the build system.
2008-09-03 14:07:37 +01:00
Chris Wilson
c18cc5b441 [src/Makefile.am] make check compile fix
Minor typo preventing TESTS from building.
2008-09-03 10:20:45 +01:00
Behdad Esfahbod
cf212ddaca Also test linking when cross-compiling
We build the test.  Just don't run it.
2008-09-02 22:05:06 -04:00
Behdad Esfahbod
2823ebaa6e [src/check-link.c] Simple test to check we can link to the built cairo.so 2008-09-02 21:31:43 -04:00
Behdad Esfahbod
5926257770 Revamp the build system.
Quick summary of changes:

  - Move list of cairo source files out of src/Makefile.am and into
    src/Sources.mk,

  - Generate files src/Config.mk and src/Config.mk.win32 that choose
    the right set of source files and headers based on configured
    backends and features.  This drastically simplifies building
    using other build systems.  The src/Makefile.win32 file needs
    to be updated to reflect these changes.

  - Add README files to various directories,

  - Add toplevel HACKING file.
2008-09-02 20:24:08 -04:00
Chris Wilson
a5d33bcbb4 [xlib] Keep a pointer to the cairo_xlib_display_t on the surface.
Cleanup the code somewhat by passing cairo_xlib_display_t around
internally as opposed to a Display and then having to lookup the
corresponding cairo_xlib_display_t each time.

[To get a cairo_xlib_display_t from a Display is a list traversal under
mutex (though the element we're looking for is most likely at the start),
but to get the Display is just a lockless pointer dereference.]
2008-09-02 10:49:12 +01:00
Chris Wilson
939b836bfa [xlib] Use an embedded doubly-linked list for the close display hooks.
Kill the allocation and linear search of the close display list on remove,
by embedding a list node into the parent structure.

Original patch by Karl Tomlinson <karlt+@karlt.net>, Mozilla Corporation.
https://bugzilla.mozilla.org/show_bug.cgi?id=453199#c5
2008-09-02 10:08:04 +01:00
Chris Wilson
38f779afcb [user-font] Propagate status return.
An error return possible went unpropagated - fix that. Also whilst in the
vicinity avoid the non-constant initialisation of the local variable
before the antiquated compilers moan.
2008-09-02 09:17:33 +01:00
Chris Wilson
83f390cfc5 [ps] Initialise has_creation_date.
Slipped by check-valgrind, since the boilerplate always initialised it
when explicitly setting the date.
2008-09-01 18:24:15 +01:00
Chris Wilson
e955b7399e Check that lvalue of BITSWAP8() is a uint8_t.
The bit-swapping macro uses the full register for intermediate storage so
we need to be careful to only read the low byte when using the result.

[Only the use in ps-surface.c was incorrect, I just converted the other
unsigned chars to uint8_t for consistency.]
2008-09-01 15:36:34 +01:00
Vladimir Vukicevic
d756a4d632 [xlib] check for too-large surface size in create similar to avoid UNSUPPORTED loop 2008-08-28 16:58:52 -07:00
Behdad Esfahbod
894940b81f Some nasty tracks to make changing version number not cause a total rebuild
Quite slick!  This comes handy when git-bisect'ing.  The canonical version
number is in toplevel cairo-version.h now.
2008-08-28 18:18:23 -04:00
Behdad Esfahbod
ab5c528de2 Undefine PACKAGE* macros defined by autotools
We use our own macros.  This makes it easier for other build systems.
2008-08-28 17:36:43 -04:00
Behdad Esfahbod
47b3c9aa3f Move version functions to cairo-misc.c 2008-08-28 17:29:32 -04:00
Behdad Esfahbod
89900525fb Move version number to src/cairo-version.h 2008-08-28 17:28:08 -04:00
Behdad Esfahbod
22552dae51 Rename _cairo_matrix_compute_scale_factors to _cairo_matrix_compute_basis_scale_factors 2008-08-27 20:08:49 -04:00
Behdad Esfahbod
df64e0e632 Cleanup libtool version handling
In preparation to remove the manual numbering completely
2008-08-27 18:41:22 -04:00
Vladimir Vukicevic
2cf82eaf0d [xlib] Check CreatePixmap dimensions before calling, to avoid unnecessary size errors 2008-08-27 14:16:52 -07:00
Behdad Esfahbod
719c17c293 [src/Makefile.am] Remove gcc dependency 2008-08-27 17:09:19 -04:00
Chris Wilson
a8c0998baf [ps] Check tmpfile status after reading.
Be paranoid and check to see if we encountered an error whilst reading the
temporary file.
2008-08-27 14:58:53 +01:00
Chris Wilson
de6742c5f1 [ps] Mark the hex data as unsigned char.
Use unsigned char to avoid sign extensions issues when bit shifting.
2008-08-26 23:02:41 +01:00
Chris Wilson
590ccb9006 [ps] Convert a few residual CRLF to LF.
Just a few CRLF eol-terminators remained, cluttering the output.
2008-08-26 23:01:15 +01:00
Chris Wilson
b9287e6669 [test] Cache last output and compare next time.
Compare the current output against a previous run to determine if there
has been any change since last time, and only run through imagediff if
there has been. For the vector surfaces, we can check the vector output
first and potentially skip the rasterisation. On my machine this reduces
the time for a second run from 6 minutes to 2m30s. As most of the time,
most test output will remain unchanged, so this seems to be a big win. On
unix systems, hard linking is used to reduce the amount of storage space
required - others will see about a three-fold increase in the amount of
disk used.  The directory continues to be a stress test for file selectors.

In order to reduce the changes between runs, the current time is no longer
written to the PNG files (justified by that it only exists as a debugging
aid) and the boilerplate tweaks the PS surface so that the creation date
is fixed. To fully realise the benefits here, we need to strip the
creation time from all the reference images...

The biggest problem with using the caches is that different runs of the
test suite can go through different code paths, introducing potential
Heisenbergs. If you suspect that caching is interfering with the test
results, use 'make -C test clean-caches check'.
2008-08-20 23:56:56 +01:00
Chris Wilson
98bb04cf93 [ps] Check for end-of-stream after advancing character.
Whilst writing the base85 stream we advance an extra character if we spot
a '~', however we need to be paranoid that we have not stepped beyond the
end of the data for this write.
2008-08-20 23:20:14 +01:00
Alex Rostovtsev
186e7a2602 [png] Specify a no-op flush callback (NULL deref)
libpng changed behaviour in v1.2.30 to call the png_ptr->output_flush_fn
in png_write_end(). If no flush function is provided with
png_set_write_fn(), libpng will use its default fflush() instead - which
assumes that closure passed is a FILE* and not an arbitrary user pointer.

Consequently, we must actually set a dummy output_flush_fn to avoid
segfaulting.
2008-08-19 23:45:40 +01:00
Behdad Esfahbod
00bc650455 Add new public API cairo_surface_has_show_text_glyphs()
We added cairo_has_show_text_glyphs() before.  Since this is really a
surface property, should have the surface method too.  Like we added
cairo_surface_show_page()...
2008-08-18 14:54:21 -04:00
Behdad Esfahbod
da83f405ca Tone down comment 2008-08-18 12:31:13 -04:00