Commit graph

2551 commits

Author SHA1 Message Date
Vladimir Vukicevic
3c5a02c3ed [win32] Misc win32 compilation fixes
Fix win32/MSVC defines for snprintf, inline, and M_PI
2006-09-09 17:06:21 -07:00
Vladimir Vukicevic
dbd0fa193c [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.
2006-09-09 17:05:00 -07:00
Behdad Esfahbod
99360bd35d cairo_show_glphs: Mark glyphs argument as const. 2006-09-08 15:12:07 -04:00
Carl Worth
c475d2ca69 Fix bitmap-font test failure by not generating a type1 font for a bitmap font.
This was simply a matter of ensuring that the UNSUPPORTED
return value was checked for and propagated all the way
out of cairo-type1-fallback.c
2006-09-07 17:46:21 -07:00
Carl Worth
f6bd76a4b2 type1: Enforce pre-allocation usage and fail-proof behavior of charstring_encode functions
These functions were previously returning a status value that
was almost never being checked. Instead we now make these
functions void and enforce a usage pattern that the destination
array must be pre-grown to accomodate the results. This is
verified with a couple of assert statements.

The pre-allocation was already happening with all but one call.
That call is now also fixed up.
2006-09-07 17:36:36 -07:00
Carl Worth
942cd2e026 Add _cairo_array_size to allow querying the allocated size 2006-09-07 17:33:35 -07:00
Carl Worth
8796b19b5d cairo-type1-fallback.c: Regularize some whitespace. 2006-09-07 17:09:37 -07:00
Carl Worth
8364251db5 cairo_type1_font_create: Fix missing NO_MEMORY check and cleanup style. 2006-09-07 17:07:54 -07:00
Carl Worth
75ac7ee171 Remove font->status from cairo_type1_font_t
This object doesn't act like a status-holding object, (there are no
"if (status) return;" inertness-enforcing statements for example),
so it shouldn't pretend like it is.
2006-09-07 16:54:31 -07:00
Carl Worth
c28c33a588 Check status value of output_stream object at time of destroy 2006-09-07 16:42:04 -07:00
Carl Worth
179f7defdf 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).
2006-09-07 16:10:40 -07:00
Carl Worth
89e7d5d420 Make _cairo_output_stream_destroy return the stream's status as a last gasp. 2006-09-07 16:01:07 -07:00
Carl Worth
3a92ab69c8 test: Report details errors when image output files cannot be found. 2006-09-07 13:09:25 -07:00
Nicholas Miell
d598cd8d61 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>
2006-09-07 12:48:28 -07:00
Nicholas Miell
203d70a562 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>
2006-09-07 12:48:23 -07:00
Behdad Esfahbod
404e88ea6a configure.in: Require automake version 1.9 here too 2006-09-06 17:48:20 -04:00
Carl Worth
8a25471c25 autogen.sh: Require automake version 1.9
This is the first version of automake to support a slash in SUBDIRS, (as
used by the recent addition of cairo/boilerplate). Thanks to Frederic Peters
for pointing this out (fixes bug #8152).
2006-09-06 14:20:24 -07:00
Behdad Esfahbod
b5a64138bb [x86-64] check-plt.sh: match on JU?MP_SLO as on x86-64 "SLOT" is truncated 2006-09-06 16:39:18 -04:00
Behdad Esfahbod
e25add77df Add 2006-09-06 13:58:31 -04:00
Behdad Esfahbod
cd1b665064 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.)
2006-09-06 13:54:12 -04:00
Behdad Esfahbod
3d398b1a21 [test/Makefile] Unset DIST_SUBDIRS 2006-09-06 13:49:53 -04:00
Behdad Esfahbod
c4d863afad [perf/Makefile] Unset DIST_SUBDIRS 2006-09-06 13:49:27 -04:00
Behdad Esfahbod
6b377b62ac Update 2006-09-06 13:49:02 -04:00
Behdad Esfahbod
94c361cd2a [Makefile] Add perf to DIST_SUBDIRS 2006-09-06 13:47:37 -04:00
Behdad Esfahbod
8c9ea020ca [Makefile] Fix typo 2006-09-06 12:45:07 -04:00
Carl Worth
a7844338da perf: Add tessellate test case (in -16, -64, and -256 varieties) 2006-09-06 05:17:01 -07:00
Carl Worth
221c02098f perf: Allow CAIRO_TEST_TARGET to limit targets tested.
Also, don't print the image size for a test if there is only one.
2006-09-06 05:09:19 -07:00
Carl Worth
b866069210 perf: Handle 32-bit wraparound of performance counter 2006-09-06 05:07:08 -07:00
Carl Worth
b64645c567 perf: Fix cairo_perf_ticks_per_second to avoid wraparound 2006-09-06 03:32:07 -07:00
Carl Worth
d9082d59db Prefer CPU performance counters (if available) over gettimeofday.
I've seen this improve the std. deviation often by a factor of 2
and occasionally up to a factor of 10. It is sometimes not much
better, but never seems to be appreciably worse compared to using
gettimeofday.

Thanks to David A. Schleef <ds@schleef.org> and his liboil for
the implementation.
2006-09-06 01:37:13 -07:00
Carl Worth
1085d99bc3 perf/README: Update due to cairo_perf_timer API changes 2006-09-06 00:56:56 -07:00
Carl Worth
3c407aa80a perf-paint: Spend more iterations on smaller sizes to balance testing.
The values here are chosen to try to equalize the standard deviation
of the various tests.
2006-09-06 00:53:52 -07:00
Carl Worth
3519887f18 perf: Move sorting and discarding outside of compute_stats. Adjust discard to slowest 15% only. 2006-09-06 00:52:06 -07:00
Carl Worth
d31037e421 perf: Report times not rates. Interface in integers not doubles. 2006-09-06 00:15:49 -07:00
Carl Worth
9d0d38e0a0 perf: Rename functions in line with cairo's naming guidelines 2006-09-05 22:58:33 -07:00
Carl Worth
9f51fcc888 perf: Fold cairo-perf-timer.h into cairo-perf.h 2006-09-05 22:56:00 -07:00
Carl Worth
499a3a7c47 perf: Remove unused alarm functions 2006-09-05 22:52:00 -07:00
Benjamin Otte
df8cc10073 perf: Make cairo_perf_timer structure private. Make timer functions void. 2006-09-05 22:48:38 -07:00
Benjamin Otte
1bb6f9fb10 perf: Add yield and fix double comparison
- add a yield () function that's called before every test. It reduced the std
dev slightly for me
- fix double comparisons to not just compare the integer part
2006-09-05 22:36:56 -07:00
Carl Worth
bcb7863f00 Move target tolerance to cairo_test_target structure (should let single-pixel SVG errors pass)
Previously we were setting the target tolerance based on the surface
type. But that doesn't work as multiple backends will provide a surface
of type meta. So instead we put the tolerance as a value in the
cairo_test_target data structure.

With this change, some single-pixel errors of 1 in the SVG backend
should now be ignored.
2006-09-05 22:25:21 -07:00
Carl Worth
4620b929ae RELEASING: Add note on checking for local symbol PLT entries. 2006-09-05 17:22:13 -07:00
Carl Worth
60c4add26a slim_hidden_proto: Move smeicolon from definition to use for consistency and legibility 2006-09-05 17:22:07 -07:00
Carl Worth
d7f08794ef Add many missing slim_hidden calls to bypass PLT entries for local use of public functions 2006-09-05 17:22:00 -07:00
Carl Worth
e06246b9b1 pixman: Add pixman_private decorations to hide pixman symbols from public interface 2006-09-05 17:21:48 -07:00
Adrian Johnson
d716020db2 Generate Type 1 fonts from glyph outlines
This patch generates Type 1 fonts for the PS/PDF backends when TrueType
or Type 1 subsetting fails. This has the advantage over the current
Type 3 fallback of reduced font size and better quality rendering
in some PDF viewers. xpdf shows a large improvement in text display
quality with this patch.
2006-09-05 15:57:47 -04:00
Adrian Johnson
ad78eb7692 Improve error checking in TrueType subsetting
TrueType subsetting will SEGV when using OpenType fonts with CFF outlines.
2006-09-05 14:53:33 -04:00
Adrian Johnson
49fa8d353b Correct the value of /LastChar in the PDF Type 1 font dictionary. 2006-09-05 14:19:48 -04:00
Adrian Johnson
d81de15804 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.
2006-09-05 14:19:26 -04:00
Behdad Esfahbod
e5a9c23308 [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.
2006-09-02 19:52:38 -04:00
Carl Worth
7c97a787eb bug 8104: Eliminate unused variables. Replicate assert statement to identify branch of interest. 2006-09-01 16:10:25 -07:00