Commit graph

2525 commits

Author SHA1 Message Date
Carl Worth
16a08ff1b0 Add test case from bug #8379 demonstrating infinite loop during round join
(cherry picked from 8744929030 commit)
2006-11-02 13:02:03 -08:00
Behdad Esfahbod
459223945e [configure.in] Require pkg-config 0.19. (#8686)
(cherry picked from 157663e1fd commit)
2006-11-02 13:02:03 -08:00
Carl Worth
d2ab45fed7 Bug #7497: Change _cairo_color_compute_shorts to not rely on any particular floating-point epsilon value.
(cherry picked from b62710d4f8 commit)
2006-11-02 13:02:02 -08:00
Adrian Johnson
97a712ce4e PDF: Add cairo version to document info dictionary
(cherry picked from 830804c7ae commit)
2006-11-02 13:02:02 -08:00
Adrian Johnson
916ccab198 PS: Add cairo version to PS header
(cherry picked from 5aaa1988c7 commit)
2006-11-02 13:02:02 -08:00
Adrian Johnson
d883217773 Type1 subsetting: Don't put .notdef in Encoding when there are 256 glyphs
Type1 subsetting adds the .notdef glyph to the subset because the Type 1
spec requires that it be defined. However if the subset already has
256 glyphs, this will cause the Encoding vector to have 257 entries
which ghostscript does not like.
(cherry picked from 753763ff25 commit)
2006-11-02 13:02:02 -08:00
Adrian Johnson
df7faeff4e Correct an unsigned to signed conversion problem in truetype subsetting bbox
(cherry picked from d1fb02b5b9 commit)
2006-11-02 13:02:02 -08:00
Christian Biesinger
3f519f672a fix comment: pixman_private needs to be before the type of a variable
Makes the documentation match the code.
Compare also commit 34d11aa3c4
(cherry picked from 38dcddd79e commit)
2006-11-02 13:02:02 -08:00
Behdad Esfahbod
07009ab72f [slim] hide cairo_glitz_surface_create() (#8551)
(cherry picked from f6a2811c87 commit)
2006-11-02 13:02:02 -08:00
Carl Worth
2734968e29 Fix typo that was resulting in device glyph_extents of INT16_MAX in some cases.
(cherry picked from f1db013547 commit)
2006-11-02 13:02:02 -08:00
Behdad Esfahbod
c6beeda701 [Makefile.am] Pass srcdir down to the tests
(cherry picked from 2041db9196 commit)
2006-11-02 13:02:01 -08:00
Carl Worth
405d5b7dca Add new _cairo_pattern_create_for_status so that patterns properly propagate errors.
In particular, many possible error values on a surface provided
to cairo_pattern_create_for_surface were previously being swallowed
and a nil pattern was returned that erroneously reported
CAIRO_STATUS_NO_MEMORY.
(cherry picked from 01502471e3 commit)
2006-10-31 21:17:30 -05:00
Carl Worth
20d7a556ce Fix cairo_image_surface_create to report INVALID_FORMAT errors.
This adds a new nil cairo_image_surface to hold CAIRO_STATUS_INVALID_FORMAT.
Previously the detected error was being lost and a nil surface was
returned that erroneously reported CAIRO_STATUS_NO_MEMORY.
(cherry picked from 4d2b54a271 commit)
2006-10-31 21:17:09 -05:00
Behdad Esfahbod
e4ff87ea59 [check-headers.sh] Don't use '\>' regexp syntax
(cherry picked from 1e0e207509 commit)
2006-10-31 21:16:44 -05:00
Alfred Peng
372e631a83 Use pixman_private consistently as prefix not suffix
(cherry picked from 34d11aa3c4 commit)
2006-10-31 21:16:28 -05:00
Alfred Peng
a3ac198b0a Add Sun Pro C definition of pixman_private
(cherry picked from c1495742f7 commit)
2006-10-31 21:16:22 -05:00
Carl Worth
ba8b0c0268 Fix dependency of 'make doc' so that necessary header files are built first.
(cherry picked from 28cc64aa20 commit)
2006-10-31 21:16:16 -05:00
Carl Worth
4c838dddd1 Rename docs-publish target to doc-publish in order to be consistent with the doc target.
(cherry picked from deef1a6675 commit)
2006-10-31 21:15:54 -05:00
Carl Worth
d65a8fd422 Fix Makefile bug preventing 'make doc' from succeeding
(cherry picked from e6575fb3c7 commit)
2006-10-31 21:15:47 -05:00
Carl Worth
0a59ab7d55 Fix typo in documentation of cairo_in_fill (thanks to Jonathan Watt) and clarify a bit.
(cherry picked from b99d41a0b0 commit)
2006-10-31 21:15:17 -05:00
Robert O'Callahan
57bca39e08 Remove redundant call to _cairo_surface_get_extents
We called it just above with the same parameters.
(cherry picked from 17eeacfba8 commit)
2006-10-31 21:14:18 -05:00
Carl Worth
b586c0456e Rename test from stale path-data name to copy-path
(cherry picked from e4dc73ab1c commit)
2006-10-31 21:13:52 -05:00
Carl Worth
cfffc5022e Fix cairo_copy_path and cairo_copy_path_flat to propagate errors.
One of these functions was already documented to be doing this, and
the other one should have been. Now the documentation and behavior
for both are consistent, (and the path-data test case verifies this).
(cherry picked from 5f833c134b commit)
2006-10-31 21:13:37 -05:00
Kristian Høgsberg
b74b14ad45 Compute right index when looking up left side bearing.
When looking up the short entries in the second part of
the hmtx table, compute the size of the first part correctly.

Fix from Adrian, see:

  https://bugs.freedesktop.org/show_bug.cgi?id=8180#c12
(cherry picked from f9165638bf commit)
2006-10-31 21:13:14 -05:00
Behdad Esfahbod
bdff62a4b6 [configure] Print out whether SVG and PDF surfaces can be tested
(cherry picked from 7c3062240a commit)
2006-10-31 21:13:00 -05:00
Carl Worth
4085afc75d Add missing pixman_private to _FbOnes when a function.
This was thanks to a report from crucible (run #2113) since it tested
with older versions of gcc (3.3.6) than most of the cairo developers
use, (so we had been getting the _FbOnes macro not the function).
(cherry picked from 82b710ebc2 commit)
2006-10-31 21:11:49 -05:00
Behdad Esfahbod
6e7610cc1f check-def.sh: Only allow _cairo_.*_test_.* symbols, not all _cairo.* ones
(cherry picked from 42a0c6bd59 commit)
2006-10-31 21:11:44 -05:00
Behdad Esfahbod
73e7dff756 cairo-directfb.h: Add missing cairo_public decorators
(cherry picked from 6c01b2ffb3 commit)
2006-10-31 21:11:38 -05:00
Behdad Esfahbod
ba76564270 cairo-pdf.h: Add missing cairo_public decorators
(cherry picked from 7bb72f6453 commit)
2006-10-31 21:11:33 -05:00
Behdad Esfahbod
8a1d9ca2dd check-headers.sh: Add a test for cairo_public decorators in public headers
Test fails currently because of bug 8313 and similar issues.
(cherry picked from 01f10fb27a commit)
2006-10-31 21:11:25 -05:00
Carl Worth
cb46125b5f Fix typo in error message (enhacement -> enhancement)
(cherry picked from edfceea853 commit)
2006-10-31 21:11:07 -05:00
Vladimir Vukicevic
8756984041 Correctly acquire/release mutex in _cairo_scaled_font_map_destroy
_cairo_scaled_font_map_destroy needs to both lock/unlock the mutex,
not just unlock it.
(cherry picked from 5ab72579ef commit)
2006-10-31 21:09:43 -05:00
Carl Worth
48e0509f93 test/bitmap-font: Fix arguments to FcFreeTypeQuery to avoid warnings.
(cherry picked from 416e94532b commit)
2006-10-31 21:07:43 -05:00
Vladimir Vukicevic
baca4a50ac [win32] Misc win32 compilation fixes
Fix win32/MSVC defines for snprintf, inline, and M_PI
(cherry picked from 3c5a02c3ed commit)
2006-10-31 21:07:00 -05:00
Vladimir Vukicevic
387499c650 [win32] Make cairo as a win32 static library possible
This adds a win32 initialization function that is called from all
surface creation and font creation functions to ensure that the win32
mutexes are initialized.
(cherry picked from dbd0fa193c commit)
2006-10-31 21:02:38 -05:00
Carl Worth
2be2b11231 Use new return value from _cairo_output_stream_destroy
This is a little simpler than the old idiom of calling
_cairo_output_stream_get_status just before calling
_cairo_output_stream_destroy.

I had hoped this technique would apply in more cases, but
many cases want to separate the two actions anyway to do
conditional assignment of the status value, (in order to
not overwrite an earlier error value).
(cherry picked from 179f7defdf commit)
2006-10-31 21:01:03 -05:00
Carl Worth
d0657f65dd Make _cairo_output_stream_destroy return the stream's status as a last gasp.
(cherry picked from 89e7d5d420 commit)
2006-10-31 21:00:56 -05:00
Nicholas Miell
13612ac7a8 Make the SLIM macros robust in the face of macro-renamed symbols
This doesn't actually fix the AMD64 link failure, but it does make the
foo/EXT_foo/INT_foo symbol names generated by the slim_hidden_proto()
and slim_hidden_def() macros consistent in the face of the meddling of
pixman-remap.h.

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
(cherry picked from 203d70a562 commit)
2006-10-31 20:59:33 -05:00
Nicholas Miell
d4793cb997 Fix the AMD64 final link by removing SLIM from pixman
In order for SLIM's PLT indirection avoidance to work, everything in
the library that makes internal function calls needs to see the
relevant slim_hidden_proto() macro in addition to the function's
prototype. However, external headers used by clients of the shared
library should not use the SLIM macros at all.

Pixman is a rather odd case -- it's mostly independent from cairo, so
it has it's own public interface, but it's built as a part of cairo
instead of its own shared library. This means that cairo would need to
see all of pixman's slim_hidden_proto() macros in order to function
and it doesn't currently, which results in a link failure on AMD64
systems and on i386 systems (I think, I haven't actually verified
this) it produces a shared object that isn't actally sharable.

I have no idea why exactly the link failure only showed up as a result
of commit e06246b9b1. I think it has
something to do with the pixman functions no longer having PLT entries
at all, but the exact interaction isn't clear to me.

However, all of these pixman functions aren't part of the cairo ABI
(which is why they were marked pixman_private in the first place),
which means that the SLIMification of pixman is largely pointless --
they aren't externally visible, so they don't need PLT entries at
all. Furthermore, while pixman may eventually be shared among cairo
and X, I'm told that this sharing will be source-level only, which
means it won't ever be an actual shared library and thus won't ever
need SLIM at all.

So, I just removed all use of SLIM in pixman (leaving behind
slim_internal.h for the future edification of anyone who cares).This
fixes the AMD64 link failure and passes the check-plt & check-def
parts of make check.

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
(cherry picked from d598cd8d61 commit)
2006-10-31 20:59:29 -05:00
Behdad Esfahbod
bd8790bbc5 [x86-64] check-plt.sh: match on JU?MP_SLO as on x86-64 "SLOT" is truncated
(cherry picked from b5a64138bb commit)
2006-10-31 20:57:50 -05:00
Behdad Esfahbod
e46d73951d Add scripts to sanity check the shared object for exported and PLT symbols
src/check-def.sh checks that the list of symbols exported is the same as the
list of symbols in cairo.def, ie. symbols in public header files. (except for
symbols starting with _cairo)

src/check-plt.sh checks that no PLT entries exist for local function calls.
This makes sure we keep the 'slim' annotations uptodate.

These two are defined as tests in src/ and will be run during "make distcheck".
However, they are skipped if the commands 'nm' and 'readelf' are not found.
(We don't really rely on any functionality of eu-readelf, so using readelf
proper which should be more commonlly installed.)
(cherry picked from cd1b665064 commit)
2006-10-31 20:57:40 -05:00
Carl Worth
b0c18ef2e8 RELEASING: Add note on checking for local symbol PLT entries.
(cherry picked from 4620b929ae commit)
2006-10-31 20:56:42 -05:00
Carl Worth
e14a7b0786 slim_hidden_proto: Move smeicolon from definition to use for consistency and legibility
(cherry picked from 60c4add26a commit)
2006-10-31 20:56:30 -05:00
Carl Worth
94ef526d4b Add many missing slim_hidden calls to bypass PLT entries for local use of public functions
(cherry picked from d7f08794ef commit)
2006-10-31 20:56:17 -05:00
Carl Worth
bbc0f3f87d pixman: Add pixman_private decorations to hide pixman symbols from public interface
(cherry picked from e06246b9b1 commit)
2006-10-31 20:56:09 -05:00
Adrian Johnson
63b28849c6 Improve error checking in TrueType subsetting
TrueType subsetting will SEGV when using OpenType fonts with CFF outlines.
(cherry picked from ad78eb7692 commit)
2006-10-31 20:55:50 -05:00
Adrian Johnson
e194c9cdbe Correct the value of /LastChar in the PDF Type 1 font dictionary.
(cherry picked from 49fa8d353b commit)
2006-10-31 20:55:43 -05:00
Adrian Johnson
25e46ac935 Fix Type 1 embedding in PDF
PDF Files with Type 1 fonts fail to open in any version of
ghostscript prior to 8.54. The problem is the hex encoding of the
encrypted portion of the font. The PDF reference says this should
only be in binary.
(cherry picked from d81de15804 commit)
2006-10-31 20:55:37 -05:00
Behdad Esfahbod
ab1c334c7e [configure] Invalidate cached warning flags if list of flags changes
such that one doesn't need to remove config.cache when when we add
new warning flags to be checked.
(cherry picked from e5a9c23308 commit)
2006-10-31 20:55:23 -05:00
Carl Worth
80d8e695ff bug 8104: Eliminate unused variables. Replicate assert statement to identify branch of interest.
(cherry picked from 7c97a787eb commit)
2006-10-31 20:55:11 -05:00