Commit graph

6170 commits

Author SHA1 Message Date
Chris Wilson
64949b8173 [test/operator-source] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:06 +01:00
Chris Wilson
971f030b7d [test/operator-clear] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:06 +01:00
Chris Wilson
9b919b0e91 [test/extend-pad] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:06 +01:00
Chris Wilson
69415b4fc6 [test/device-offset-scale] Propagate errors
Use cairo_get_target() to propagate errors from the secondary contexts.
2008-10-21 11:31:06 +01:00
Chris Wilson
9ab296123e [test/device-offset-positive] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:14:01 +01:00
Chris Wilson
594fa0836f [test/device-offset] Propagate error.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:12:11 +01:00
Chris Wilson
29da47be60 [ps] Check for an empty font subset.
Return early before trying to emit an empty subset into the document -
avoids a potential use of an uninitialised status variable.
2008-10-21 10:42:41 +01:00
Chris Wilson
fd1f3c27e0 [configure] Check for atomic xchg.
Bug 18140 identifies a case where we have an atomic increment, but not an
atomic exchange. We need both to implement atomic reference counting, so
add a second check to detect whether __sync_val_compare_and_swap
generates a non-atomic instruction.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18140.
2008-10-21 09:23:15 +01:00
Chris Wilson
71e4f7e3a1 Add API documentation for NULL filenames and write_funcs.
Mention in the API docs that you can pass a NULL filename to
cairo_(pdf|ps|svg)_surface_create in order to construct a queryable
surface without generating any temporary files. Similarly when passing a
NULL write_func to cairo_pdf_surface_create_for_stream et al.
2008-10-20 23:54:57 +01:00
Chris Wilson
6cb2b29434 [mutex] s/HOLDS_MUTEX/MUTEX_IS_LOCKED/
Behdad prefers the latter to keep a clean namespace.
2008-10-20 23:32:44 +01:00
Chris Wilson
ae9d17c015 [directfb] Unbounded operators are unsupported.
Currently the emulation of Porter-Duff operators does not correctly
handle the unbounded operators.
2008-10-20 23:32:34 +01:00
Chris Wilson
1f35f31c4e [directfb] Fallback for SATURATE
We're unable to satisfactorily emulate SATURATE using the src/dst blend
modes, so fallback. (Might just be a bug in libdirectfb...)
2008-10-20 23:20:25 +01:00
Chris Wilson
c7951c4a36 [directfb] Perfom text fallback if emulating clip regions.
Fallback if we have a clip that is not a simple region.
2008-10-20 23:20:25 +01:00
Chris Wilson
98933fd4b8 [directfb] When blitting check if we need the un-premultiplied color.
When blitting whether we need to use the premultiplied color is dependent
upon the destination surface capabilities.
2008-10-20 23:20:24 +01:00
Chris Wilson
4af8aa5f4d [directfb] Apply clip to release_dest_image()
We need to respect the current clip when copying the fallback image back to
the target surface.
2008-10-20 23:20:24 +01:00
Chris Wilson
0ba5085ba0 [directfb] Fix OBO in clip.
DirectFB seems to use inclusive upper bounds.
2008-10-20 23:20:24 +01:00
Chris Wilson
2743e84171 [directfb] Force NEAREST.
The current version of DirectFB does not support any filters, so set
NEAREST on the source patterns so that we can fully optimize the pattern
inside core.
2008-10-20 23:20:24 +01:00
Chris Wilson
f1669d31c0 [directfb] Track the empty clip rectangle.
A region with no extents means everything should be clipped out, so we
need an extra flag to disambiguate when we have 0 clip rectangles.
2008-10-20 23:20:24 +01:00
Chris Wilson
ebe3048f9b [directfb] Cap the maximum surface size to use for the font cache.
Fallback if we need to create a cache larger than the maximum usable
surface.
2008-10-20 23:20:23 +01:00
Chris Wilson
6f35c2d13e [directfb] Only use the pure BLIT for integer translations.
If we have non-integer translation on a source pattern then we need to use
STRECTHBLIT (the core takes care to optimize NEAREST patterns to integer
translations so that this will only be used when interpolation is
required).
2008-10-20 23:20:23 +01:00
Chris Wilson
55bb7087b0 [directfb] Tweak _categorize_operation().
Explicitly list the extend modes that are supported/unsupported and
immediately check for an unsupported operation.
2008-10-20 23:20:23 +01:00
Chris Wilson
edb65213ec [directfb] Support ROI cloning.
Only clone the ROI in order to efficiently handle large sources.
2008-10-20 23:20:23 +01:00
Chris Wilson
4006e49ac1 [directfb] Rename backend structure.
Use _cairo_directfb_surface_backend for consistency with other backends.
2008-10-20 23:20:23 +01:00
Chris Wilson
7e31ddbb08 [directfb] Whitespace.
Trim lots of trailing whitespace and fix up according to CODING_STYLE.
2008-10-20 23:20:23 +01:00
Chris Wilson
d49563280b [directfb] Simplify return from _directfb_get_operator().
Used only as a predicate, so simply return a boolean.
2008-10-20 23:20:22 +01:00
Chris Wilson
b17d0ded8c [directfb] Use the solid pattern cache.
The dfb backend recreated a solid color surface for every colour,
completely bypassing the solid pattern cache.
2008-10-20 23:20:22 +01:00
Chris Wilson
786bea48df [boilerplate/directfb] Create ARGB surfaces on demand.
Create an RGB or ARGB surface depending upon the content type of the test
target, with the result that the directfb rgb24 target no longer
unconditionally fails.
2008-10-20 23:20:22 +01:00
Chris Wilson
4ba9ccc6ab [configure.ac.analysis] s/safe/_save/
Rename the temporary variable in line with the convention used by the rest
of the build system.
2008-10-20 23:07:38 +01:00
Chris Wilson
3a45b07af9 [perf] Free images for composite-checker
Fix memleak of the image surfaces.
2008-10-20 23:04:03 +01:00
Chris Wilson
86356a9578 [test] Add degenerate-dash to XFAIL.
PS (ghostscript) interprets the degenerate end-caps quite differently, and
perhaps slightly more rationally... Add this to XFAIL, until we have a
definitive specification on how we should behave.
2008-10-20 23:04:03 +01:00
Behdad Esfahbod
83d2552e4c Remove CAIRO_BEGIN_DECLS uses that ickle introduced while merging 2008-10-20 17:59:41 -04:00
Chris Wilson
eab37f76b0 [directfb] Return an error surface on create() failure.
Do not return NULL but an NO_MEMORY error surface if we fail to allocate
the surface during creation.
2008-10-19 22:12:18 +01:00
Chris Wilson
6a02f53dd1 [directfb] Simplifiy ADD_TRI
Simplify the ADD_TRI macro to make the code more readable.
2008-10-19 14:21:15 +01:00
Chris Wilson
aba457fe64 [directfb] Add missing error status
We jumped to the ERROR path without setting an error status - assume
NO_MEMORY.
2008-10-19 14:03:24 +01:00
Chris Wilson
610451e4a7 [directfb] Correct fixed-to-double conversion.
The trapezoid calculations had not been updated after the 16.16->24.8
switch. Use _cairo_fixed_to_double() rather than open-coding.
2008-10-19 12:45:45 +01:00
Chris Wilson
8e0950ced8 [boilerplate/directfb] Gracefully handle failure to create surface.
Simply return NULL indicating failure to create the target surface rather
than aborting the test (allowing other targets to be tested).
2008-10-19 12:32:41 +01:00
Chris Wilson
801df1b87a [directfb] Fix error propagation from surface_create()
Do not mask fatal errors, but correctly propagate the error status.
2008-10-19 12:32:30 +01:00
Chris Wilson
476d17fa78 [directfb] Compile fix.
Fixup compilation after 901f0b.
2008-10-19 11:35:27 +01:00
Chris Wilson
d72969289d [image] Remove unused variable.
Cleanup the compiler warning for the unused status after code shuffling.
2008-10-19 09:47:33 +01:00
Chris Wilson
f2ff794426 [perf] A crude tool to visualise performance changes across a series.
Generate a cairo-perf-diff graph for a series of commits in order to be
able to identify significant commits. Still very crude, but minimally
functional.
2008-10-19 09:36:53 +01:00
Chris Wilson
41c8eefc6d [output-stream] Protect against NULL write_func.
Allow the user to specify a NULL write_func for the output stream so that
a dummy surface can be created, for example, for querying target font
options or font extents.

Currently we do not perform any sanity checks at the user entry point and
will generate a mysterious SEGV during cairo_surface_finish() - which may
not immediately be obvious that it is due to a NULL write_func.
2008-10-19 09:36:53 +01:00
Chris Wilson
84e4a825ff [output-stream] Accept a NULL filename
Principally to support creating a dummy vector surface (i.e.
cairo_ps_surface_create (NULL, 1, 1)) that can be used to determine font
extents (or target font options) before opening an output file, but also
because we currently fail to do any sanity checking at the entry point.
2008-10-19 09:36:53 +01:00
Chris Wilson
52ea38f97b [meta] Acquire scaled_font mutex for glyph_path().
The caller of _cairo_scaled_font_glyph_path() is expected to be holding
the scaled_font->mutex.
2008-10-19 09:36:52 +01:00
Chris Wilson
299ea0580a [user-font] Review locks under error conditions.
Simplify the error handling by only relinquishing the global
scaled_font_map mutex if we successfully insert the placeholder font. The
result is that on the error path, there are no changes to global state and
thus we can entirely skip the user-font initialisation and
re-registration.
2008-10-19 09:36:52 +01:00
Chris Wilson
c76a8481f3 [analysis] Check for error surfaces.
If the target surface is an error surface, ensure that we return the
appropriate error surface. Likewise, avoid writing to error surfaces.
2008-10-19 09:36:52 +01:00
Chris Wilson
5b28b0b903 [ps] Destroy type3 surface on error.
After an error, ensure that the local type3 surface is destroyed.
2008-10-19 09:36:52 +01:00
Chris Wilson
6b17c6da47 [type3] Acquire scaled_font mutex whilst looking up glyphs.
When looking up the glyph in the shared scaled_font glyph cache, the
caller is required to have taken the scaled_font->mutex.
2008-10-19 09:36:51 +01:00
Chris Wilson
f56cf93181 [user-font] Check for error objects.
Check that the user has not passed in an inert error object before any
attempts to write to it and return the default values.
2008-10-19 09:36:51 +01:00
Chris Wilson
1f9f9d936b [pdf] Acquire scaled_font mutex for show_text_glyphs().
We need to be holding the scaled font mutex over a call to draw text
glyphs from within an smask group.
2008-10-19 09:36:51 +01:00
Chris Wilson
12fb8c9b7c [type1] Acquire scaled_font mutex.
In order to perform glyph lookups we need to be holding the mutex for the
scaled_font.
2008-10-19 09:36:51 +01:00