Commit graph

2586 commits

Author SHA1 Message Date
Vladimir Vukicevic
8a9b99e596 [perf] Change perf output format, report times in ms, add a few paint tests
This changes the perf test output format to be a little more human friendly,
reporting times in ms instead of seconds.  It also adds a test number
that could be used in the future for specifying an explicit test to run
(test number, target surface, test name, and size uniquiely identify
a test).

Also adds a few paint tests.
2006-09-19 12:19:20 -07:00
Vladimir Vukicevic
e42905b01b [win32,perf] Fix cairo-perf-win32
Make cairo-perf work on win32
2006-09-19 12:19:20 -07:00
Carl Worth
82b710ebc2 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).
2006-09-19 10:13:36 -07:00
Behdad Esfahbod
42a0c6bd59 check-def.sh: Only allow _cairo_.*_test_.* symbols, not all _cairo.* ones 2006-09-19 13:05:29 -04:00
Behdad Esfahbod
ae355453d8 cairo-nquartz.h: Add missing cairo_public decorators. 2006-09-18 13:32:41 -04:00
Behdad Esfahbod
6c01b2ffb3 cairo-directfb.h: Add missing cairo_public decorators 2006-09-18 13:32:19 -04:00
Behdad Esfahbod
7bb72f6453 cairo-pdf.h: Add missing cairo_public decorators 2006-09-18 13:32:00 -04:00
Behdad Esfahbod
01f10fb27a check-headers.sh: Add a test for cairo_public decorators in public headers
Test fails currently because of bug 8313 and similar issues.
2006-09-18 13:31:26 -04:00
Behdad Esfahbod
38ed0eeb5b [ROADMAP] Add polling API 2006-09-15 15:35:12 -04:00
Behdad Esfahbod
b9cbfba7d2 [ROADMAP] Check RGB16_565 deprecated 2006-09-15 15:34:44 -04:00
Peter Weilbacher
2fd0ad9489 OS/2 build changes 2006-09-15 11:18:47 +02:00
Peter Weilbacher
8c6baacefa OS/2 backend files 2006-09-15 11:18:14 +02:00
Carl Worth
edfceea853 Fix typo in error message (enhacement -> enhancement) 2006-09-13 15:27:32 -07:00
Vladimir Vukicevic
3623da441a [nquartz] Initial commit of native quartz surface
Inital commit of Native Quartz surface.  The main missing functionality
is mask() support (which is just a noop right now, except for the simple
solid-alpha case).
2006-09-13 14:48:40 -07:00
Stuart Parmenter
f1bd0b9f98 [win32] correct win32 show_glyphs for non-y-aligned text
Correctly calculate destination glyph coordinates for win32_show_glyphs.
2006-09-12 16:27:40 -07:00
Vladimir Vukicevic
0166538126 [win32] Support for DDBs, AlphaBlend fix
Add support for the win32 surface using DDBs for similar surfaces and the
like when the orignal surface is created from a DC, or when a DDB is
explicitly created.  A DIB is still created if alpha is required.

Also fixes a case where blitting win32 RGB24 -> ARGB32 surfaces was causing
alpha to leak into the ARGB32 surface instead of being set to fully opaque.
2006-09-12 16:08:40 -07:00
Vladimir Vukicevic
924bbd06f3 Check for valid path status value before calling _cairo_set_error
cairo_status_t is a signed type, so we need to check for invalid codes
that are < 0 as well.

Also removes the MSVC goop in path-data.c that was attempting to work
around the assert earlier.
2006-09-11 12:36:41 -07:00
Carl Worth
bcc13ede9b Move the REPLACED/DEPRECATED_BY macros from cairo.h to cairo-deprecated.h 2006-09-11 11:12:47 -07:00
Carl Worth
79aed8c5fc Deprecated CAIRO_FORMAT_RGB16_565. Add cairo-deprecated.h . 2006-09-11 11:05:02 -07:00
Carl Worth
cb6aed0a81 perf: Make xlib testing wait for the X server to finish rendering.
We do this by adding a new cairo_perf_timer_set_finalize function and
in the case of the xlib backend passing a callback to that function
that does a 1x1 XGetImage.
2006-09-11 10:59:38 -07:00
Vladimir Vukicevic
e1a8a8b65a [win32] Set win32 assertion failure handlers for tests to stderr
assert() will default to displaying a dialog box, which makes it hard
to run tests automatically.  Set the reporting mode to only report
to stderr in cairo_test(), and in path-data, since that triggers
an early assert.
2006-09-09 23:54:40 -07:00
Vladimir Vukicevic
00d5a2ed48 [win32] Makefile.win32: use correct (/MD) runtime library flag everywhere
There was a bad mix of LIBCMT (the static runtime lib) and MSVCRT (the dynamic
one) before, because LIBCMT is the default.  This specifies /MD everywhere.
2006-09-09 23:29:17 -07:00
Vladimir Vukicevic
d78fd375d3 [win32] Makefile.win32: fix test and add html targets
Add html target to toplevel and test/ Makefile.win32
2006-09-09 22:18:47 -07:00
Vladimir Vukicevic
5ab72579ef 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.
2006-09-09 19:52:48 -07:00
Vladimir Vukicevic
d3076a1843 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo into cairo-master 2006-09-09 18:57:57 -07:00
Vladimir Vukicevic
dfe3e20a4a [win32] Fix boilerplate for win32 surfaces to use new _with_dib function
Create test surfaces for win32 using _with_dib instead of creating the
dib locally; also test CONTENT_COLOR and CONTENT_COLOR_ALPHA.
2006-09-09 18:56:58 -07:00
Vladimir Vukicevic
9735cb9a24 Improve make-html.pl, add self-contained output format
Setting CAIRO_TEST_SHOW_INLINE in the environment before running
make-html.pl will generate a html file with all the logs and necessary
images inlined as data URI's.
2006-09-09 18:55:46 -07:00
Carl Worth
78b8555c9a perf: Don't skip COLOR tests 2006-09-09 17:32:50 -07:00
Carl Worth
d3a5d90665 boilerplate-xlib: New perf-specific surface creation for xlib backend.
When testing the xlib backend do different things for TEST vs. PERF:

TEST: Always use pixmap, call Xsynchronize.

PERF: Use pixmap for COLOR_ALPHA and DefaultVisual window for COLOR.
2006-09-09 17:32:50 -07:00
Carl Worth
aeca64f6cd boilerplate: Allow targets to distinguish between test and perf.
Add a new cairo_boilerplate_mode_t so that the boilerplate targets can
do slightly different things if being tested for correctness vs. being
run for performance.
2006-09-09 17:32:50 -07:00
Vladimir Vukicevic
97f26c5235 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo into cairo-master 2006-09-09 17:09:03 -07:00
Vladimir Vukicevic
0e59041321 [win32] win32-specific Makefiles for building with MSVC
This patch adds a bunch of makefiles for building cairo with Visual C++.
gnu make is still required, and make must be run from a command prompt
that has the Visual C++ paths set up, as well as has the cygwin environment
in the path.  Run 'make -f Makefile.win32'.
2006-09-09 17:08:18 -07:00
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
Carl Worth
416e94532b test/bitmap-font: Fix arguments to FcFreeTypeQuery to avoid warnings. 2006-09-09 16:04:51 -07:00
Carl Worth
a37e667533 Use unsigned consistently to avoid compiler warning. 2006-09-09 16:04:51 -07:00
Carl Worth
195fd5cde6 boilerplate: Rename cairo_test_target_t to cairo_boilerplate_target_t 2006-09-09 16:04:51 -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