Commit graph

2500 commits

Author SHA1 Message Date
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
Behdad Esfahbod
4d7b341a7e [test] Use FcFreeTypeQuery
(cherry picked from 7ad6e94101 commit)
2006-10-31 20:53:48 -05:00
Behdad Esfahbod
eb388ca4cb [test] Use $(srcdir) to find valgrind supressions
(cherry picked from 851dd63719 commit)
2006-10-31 20:53:16 -05:00
Carl Worth
1ae5dc7e78 Require librsvg >= 2.14.0 to test SVG backend
(cherry picked from 8d834c3a34 commit)
2006-10-31 20:52:40 -05:00
Carl Worth
c55f71bdab test: Add link to test log file in HTML output
(cherry picked from 5ef4c991f6 commit)
2006-10-31 20:51:31 -05:00
Christian Biesinger
a08c0b43e2 [beos] Fix build error
Rename cairo_rectangle_fixed_t to cairo_rectangle_int16_t
as needed per commit 746f66c3fc.
(cherry picked from 05a259d493 commit)
2006-10-26 22:09:13 +02:00
Behdad Esfahbod
a5f068e10d [test] Add 128 to any diff component such that differences are visible 2006-08-30 13:19:05 -04:00
Behdad Esfahbod
3252ad5ca6 [PNG] Mark status volatile to fix gcc warning 2006-08-28 22:44:15 -04:00
Behdad Esfahbod
b6e5f2b0fe [xlib] Bug 7593: rewrite loop to be more readable, and fix warnings
Basically, it's evil to write a loop like:

    while ((c -= 4) > 0) {
        ...
    }

for one reason that doesn't work if c is unsigned.  And when c is signed, if
for some reason c is about -MAXINT, then it will overflow and not work as
expected.

It's much safer (and more gcc warning friendly) to rewrite it as:

    unsigned int c;

    while (c >= 4) {
        ...
        c -= 4;
    }
2006-08-28 22:30:38 -04:00
Carl Worth
06a9628868 Eliminate conditions checking for unsigned or enum values less than 0. 2006-08-28 19:00:48 -07:00
Carl Worth
7d1399a4bb Put static first to avoid compiler warning. 2006-08-28 18:58:27 -07:00
Behdad Esfahbod
1b7ced6614 Bug #7593: Avoid unsigned loop control variable to eliminate infinite, memory-scribbling loop.
Behdad chased this bug down when looking into bug #7593. This
bug is what finally motivated us to figure out how to get -Wextra
(for the "always true" comparisons of unsigned variables against
negative values).
2006-08-28 18:57:14 -07:00
Carl Worth
50003615f2 Add -Wextra (as well as -Wno-missing-field-initializers -Wno-unused-parameter)
We'd been wanting some of the warnings in -Wextra for a long time,
but we had failed in tryingto squelch some of the undesired warnings.
We finally figured out how to do this correctly by simply ordering
the warnings correctly.
2006-08-28 18:55:02 -07:00
Behdad Esfahbod
5492946b0c [image] Print out cairo version in the unsupported-format message 2006-08-23 12:29:49 -04:00
Behdad Esfahbod
96c8f92883 [test] bufferdiff: take abs of the pixel diffs. Oops! 2006-08-22 22:00:58 -04:00
Behdad Esfahbod
988b5dcb7e [ROADMAP] Remove 1.2.4 stuff out of the way 2006-08-21 23:27:59 -04:00
Behdad Esfahbod
edf6f24e1b [TODO] Add cairo_get_scaled_font 2006-08-21 23:27:59 -04:00
Behdad Esfahbod
3d6aec7334 [ROADMAP] Add glyph cache inspection to 1.4 roadmap 2006-08-21 23:27:59 -04:00
Adrian Johnson
782e3eb65b Get correct unhinted outlines on win32.
The documentation for GetGlyphOutline() states that outline returned is grid
fitted and if an application requires an unmodified outline it can request an
outline for a font whose size is equal to the font's em unit.

This seems to suggest that the solution to this bug would be to obtain the
unmodified outline data and scale it to the required size.

https://bugs.freedesktop.org/show_bug.cgi?id=7603
2006-08-21 12:52:56 -04:00
Yevgen Muntyan
6de226be0e Define WINVER if it's not defined. (bug 6456) 2006-08-21 03:52:40 -04:00
Behdad Esfahbod
6ed1613b51 [Makefile.am] Remove unnecessary parantheses that were causing trouble with old bash
Reported by Tor Lillqvist
2006-08-20 13:44:56 -04:00
Carl Worth
047251db43 Increment version to 1.2.5 after making the 1.2.4 release 2006-08-18 18:30:31 -07:00
Carl Worth
54755b2d98 Remove stray ] that was breaking RELEASE_OR_PUBLISH and many make targets (release-publish, etc.) 2006-08-18 18:19:10 -07:00
Carl Worth
fadde879fb Update version to 1.2.4 and libtool version to 11:2:9. 2006-08-18 17:36:42 -07:00
Carl Worth
43a25b8187 NEWS: Add notes for the 1.2.4 release. 2006-08-18 17:35:33 -07:00
Carl Worth
790a359f89 EXTRA_DIST: Add missing source-clip-scale-svg-ref.png 2006-08-18 16:46:57 -07:00