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.
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).
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).
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.
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.
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.
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.
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.
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.
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.
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.
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'.
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.
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.
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.
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).
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>
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>