Commit graph

5523 commits

Author SHA1 Message Date
Chris Wilson
3501eef698 [cairo-cache] Fixup doc comment.
Missing % before the macro name in the comment.
2008-08-17 12:13:59 +01:00
Peter O'Gorman
586dbaafe6 Compile with old compilers
Some compilers fail to compile non-constant struct initializers.
2008-08-17 11:42:48 +01:00
Chris Wilson
3998040c11 [cairo-cache] Simplify a status return to boolean.
_cairo_cache_remove_random() just returned whether it found an entry to
remove and so the code can be simplified by returning a boolean as opposed
to a status code.
2008-08-17 11:39:56 +01:00
Chris Wilson
841fe91c0e [ps] Promote char to an int to avoid valgrind warnings.
valgrind warns about an uninitialized read after a single char is promoted
to an int when passed to the printf. Silence the warning by using a
explicitly promoting the output byte to a full int.
2008-08-17 11:39:56 +01:00
Chris Wilson
8f56727986 [perf] Beware $OS may not be set.
Avoid a warning by ensuring that the two strings in the equality check are
not empty.
2008-08-17 11:39:56 +01:00
Chris Wilson
c44f2ab4d1 [perf] Silence trivial compiler warning.
The compiler complained about passing a non-string literal as the format
to printf, so just to sanitize the code and keep the compiler happy, add
the magic "%s" format.
2008-08-17 11:39:56 +01:00
Chris Wilson
db7e3cb854 [Makefile.am] Delete intermediates
Clean up after calling 'gcc -save-temps'.
2008-08-17 11:39:56 +01:00
Chris Wilson
67326b728b [gitignore] Ignore *.[is]
Playing with 'gcc -save-temps' understandably leaves behind large amounts
of clutter.
2008-08-17 11:39:56 +01:00
Chris Wilson
bafcbc633a [cairo-scaled-font] Check the most recently used font used first.
When searching for a matching font, check the most recently used font
first. This optimizes the common case where pango calls save() and restore()
around rendering each layout, but almost all consecutive layouts use the
same font.
2008-08-17 11:39:56 +01:00
Behdad Esfahbod
a1e5d40376 [doc] Another typo fix 2008-08-17 00:11:34 -04:00
Behdad Esfahbod
20d178c1c2 [doc] Fix typo 2008-08-16 21:27:03 -04:00
Chris Wilson
7a0f29d2f3 [test] Update prototype of win32-printing create_surface()
Missed the recent addition of the win32-printing surface to boilerplate.
2008-08-14 11:59:22 +01:00
Chris Wilson
63befc6ab1 [xlib] Remove the key parameter from the close display hook.
By inspecting all the users of the close display hooks, we can see that
(a) the key is redundant and (b) the data is unique to the hook. This
means we can trim the interface and stop the linear searches as soon as
we've found the correct element.
2008-08-14 09:14:51 +01:00
Chris Wilson
84a541a041 [cairo-xlib-surface] Remove status return for SUCCESS only function.
Convert _cairo_xlib_surface_set_repeat() to a void return type, and
update caller, as the function can only return CAIRO_STATUS_SUCCESS.
2008-08-14 09:06:24 +01:00
Chris Wilson
2699a986d3 [cairo-gstate] Guard against unsetting the font unnecessary.
Only unset the current font if we change any of the font settings, i.e.
font_face, font_options, font_matrix and ctm.
2008-08-14 08:59:14 +01:00
Chris Wilson
8552e76ee5 [xlib] Fix leak of pending_free_glyphs on CloseDisplay.
Missing free of the pending_free_glyphs array in
_cairo_xlib_surface_remove_scaled_font.
2008-08-14 08:25:58 +01:00
Chris Wilson
e3665bde5d [test/Makefile.am] Match *-out.{pdf,ps,svg}
When cleaning files, limit the glob to only match *-out.{pdf,ps,svg} in
order to distinguish the current practice of naming vector output files
from possible future vector target/reference files.
2008-08-13 22:02:12 +01:00
Chris Wilson
49ea4fbb25 [test/create-from-png-stream] Correct check for png loading error.
The test for failure to load the image surface from the png stream
incorrectly checked for a NULL surface, instead of the error surface.
2008-08-13 22:02:00 +01:00
Chris Wilson
93af67d7fd [test] Pass a 'complete' name to create_surface().
Construct the test name to pass to the boilerplate creation routines such
that it uniquely identifies the test in terms of test, target, content and
pass (similar, offset, thread). This allows the vector targets to create
output different output files for each test, whereas before, later tests
would overwrite existing files making debugging more difficult.
2008-08-13 22:01:51 +01:00
Chris Wilson
517e532fb7 [test] Run fallback-resolution if we have at least one vector surface.
Currently fallback-resolution is included in the test suite if we have all
of the vector surfaces available. This commit enables individual support
for the vector surfaces, so that the test can be run even if one or more
of the surfaces are not available.
2008-08-13 22:01:39 +01:00
Chris Wilson
d56ea9cc87 [test] Set CAIRO_TEST_UNTESTED to 77
77 is the magic exit code used by automake to indicate a skipped test, so
by using it we can get a slightly more informative test log.
2008-08-13 21:55:19 +01:00
Chris Wilson
f85a4aec1f [test] Export a function to check whether a target is enabled.
Allow individuals tests to check whether a test target is enabled -
useful for those tests that circumvent cairo_test() and perform
feature testing.
2008-08-13 21:55:09 +01:00
Chris Wilson
436c0c8be2 [test] Preparatory work for running under memfault.
In order to run under memfault, the framework is first extended to handle
running concurrent tests - i.e. multi-threading. (Not that this is a
requirement for memfault, instead it shares a common goal of storing
per-test data).  To that end all the global data is moved into a per-test
context and the targets are adjusted to avoid overlap on shared, global
resources (such as output files and frame buffers). In order to preserve
the simplicity of the standard draw routines, the context is not passed
explicitly as a parameter to the routines, but is instead attached to the
cairo_t via the user_data.

For the masochist, to enable the tests to be run across multiple threads
simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired
number.

In the long run, we can hope the need for memfault (runtime testing of
error paths) will be mitigated by static analysis. A promising candidate
for this task would appear to be http://hal.cs.berkeley.edu/cil/.
2008-08-13 21:54:59 +01:00
Chris Wilson
c73b3e43e1 [cairo-surface] Check for the error surface in _get_font_options()
cairo_surface_get_font_options() has the side effect of initialising the
font options on the surface, but fails to check that the surface is
valid first. Therefore if we are passed a read-only error object, we will
trigger a segmentation fault.

Most likely this is the bug behind:
http://bugs.freedesktop.org/show_bug.cgi?id=17096.
2008-08-12 21:30:51 +01:00
Adrian Johnson
922df7fc23 Win32: Fix uninitialized variable 2008-08-12 07:34:24 +09:30
Chris Wilson
31565677db [pattern] Unbounded patterns should have infinite extents.
Fix a slight typo that produced negative sized extents instead of the
maximum.
2008-08-11 20:43:14 +01:00
Chris Wilson
5ace0cb17a [cairo-test] Exclude lcd-filter tests for vector targets.
Add text-lcd-filter-* to vector_ignored_tests.
2008-08-11 20:43:14 +01:00
Behdad Esfahbod
52a8e52869 [RELEASING] Document how to release with failing tests 2008-08-11 15:28:04 -04:00
Behdad Esfahbod
75acb51a09 [configure.in] Post release version increment to 1.7.5 2008-08-11 15:19:28 -04:00
Behdad Esfahbod
012a12a67b [configure.in,NEWS] Release 1.7.4 2008-08-11 15:06:31 -04:00
Behdad Esfahbod
b176b5c29d [test/get-xrender-format.c] Don't fail if DISPLAY is not set 2008-08-11 15:06:31 -04:00
Behdad Esfahbod
bbd5f03fd8 [test/xlib-surface-source] Skip test if DISPLAY not set 2008-08-11 14:28:28 -04:00
Behdad Esfahbod
5d307b58b9 [doc] More template changes. Donno why they keep changing. 2008-08-11 13:54:39 -04:00
Behdad Esfahbod
2c53acea0b [src/Makefile.am] Include missing header file 2008-08-11 13:54:26 -04:00
Behdad Esfahbod
0e8afe87ec [RELEASING] Mention git-shortlog 2008-08-11 13:09:46 -04:00
Behdad Esfahbod
c627356460 [configure.in] Increment version to 1.7.3 post release 2008-08-11 12:12:32 -04:00
Behdad Esfahbod
057a832f9e [configure.in,NEWS] Release 1.7.2 2008-08-11 11:51:18 -04:00
Behdad Esfahbod
3dc2fc4cd9 [doc] Update templates 2008-08-11 04:46:20 -04:00
Chris Wilson
d266648276 [configure.in] Revert addition of MACRO_DIR()
Without it we get a three line warning under Ubuntu. However, it just
causes more problems than it is worth with older autoconf/automake.
2008-08-11 08:40:22 +01:00
Behdad Esfahbod
d073b6f145 [RELEASING] Update for cairo-features-win32.h 2008-08-11 01:58:32 -04:00
Behdad Esfahbod
177729ba93 [ChangeLog.mk] Revert 21ab44f11d
That commit made the ChangeLog regenration rule to depend on .git/HEAD,
not .git/.  However, the contents and timestamp of that file does not
change when you commit something locally.  Hence, ChangeLog could remain
stale.  Depending on .git/ does the job.
2008-08-11 01:54:21 -04:00
Behdad Esfahbod
650a6a3276 [RELEASING] Easier to see API diff than log 2008-08-11 01:48:10 -04:00
Behdad Esfahbod
6e4ed9ce84 Fix doc syntax 2008-08-11 01:44:54 -04:00
Behdad Esfahbod
591d5160f8 [RELEASING] Update for external pixman 2008-08-11 01:41:37 -04:00
Behdad Esfahbod
549dd9adb5 [test] Update ref image list 2008-08-11 01:40:27 -04:00
Behdad Esfahbod
f2db80bf9e [gstate] Revert Check for NULL font_face in _cairo_gstate_set_font_face
Revert commit b67d34e960.
cairo_set_font_face() is documented to accept NULL to restore default
font face.  Revert commit that made it reject NULL.
2008-08-10 23:39:44 -04:00
Behdad Esfahbod
e797f6791e [test/Makefil.am] Cosmetic 2008-08-10 23:39:28 -04:00
Chris Wilson
fef03ef98a [xlib] Check for depth == 0 in create_surface_internal().
Validate that we find an appropriate depth for the Xlib surface, before
attempting to create the surface. This was manifesting itself with
XInitImage() failures during _draw_image_surface() (actually detected as
a segmentation fault in XPutPixel() due to an incomplete XImage).  So we
also add a couple of asserts to ensure that XInitImage() is successful -
which to the best of our knowledge, they should always be.
2008-08-10 08:44:45 +01:00
Adrian Johnson
c014e51dc9 NEWS: Win32 font backend has been fixed 2008-08-10 14:49:30 +09:30
Vladimir Vukicevic
ac2781ec08 [dfb] fix crashes due to cached glyphs going away during operation 2008-08-09 22:10:10 -07:00