Commit graph

6320 commits

Author SHA1 Message Date
Chris Wilson
3f7a21c5c9 [test] Add jpeg.jpg to EXTRA_DIST
Forgot to add the new file to the distribution with the previous commit.
2008-11-04 13:46:10 +00:00
Chris Wilson
9900a2adf3 [test] Update mime-data jpeg reference data.
<adrianj> ickle_: If we are going to use a different image for jpeg in
mime-data maybe we could create a jpg that contains the text "jpeg". That
way when support for the other image formats is added the mime-data test
could have one image for each type with each image and it is easy to see
that each image is the correct one.
2008-11-04 13:41:02 +00:00
Chris Wilson
c13a09ddb4 [test] Use a different jpeg image for mime-data
Detect when we successfully encode the JPEG data from the mime-type by
using a completely image.
2008-11-04 13:03:24 +00:00
Chris Wilson
8407470409 [test] Adapt pdf-mime-data for non-srcdir build.
Need to look for reference/input images from srcdir as well.
2008-11-04 13:03:24 +00:00
Chris Wilson
8007618837 [test] Fix compilation of imagediff.
imagediff broke once again.
2008-11-04 13:03:24 +00:00
Chris Wilson
282d774427 [mime-type] Request the mime-data for the source surface, not ourselves!
Fixup a typo I introduced that caused us to request the jpeg data for the
destination surface and not the source.
2008-11-04 13:03:24 +00:00
Chris Wilson
aa616abc9a [png] Use RGB for opaque images.
If the ARGB32 is opaque, discard the alpha channel - so we should generate
byte identical output to the reference images.
2008-11-04 13:03:23 +00:00
Adrian Johnson
30976635d7 PS: Implement JPEG embedding 2008-11-04 22:54:25 +10:30
Adrian Johnson
73bc278c7a Add pdf mime data test
To test that images in PDF files correctly embedded the mime data.
2008-11-04 22:39:36 +10:30
Chris Wilson
3f18d38fbd [win32] Compile fix for extend-pad extents.
Update the show_glyphs() prototype to include the extents argument.
2008-11-04 10:43:07 +00:00
Chris Wilson
5ba95b7e12 [trace] Convert [1 0 0 1 0 0] to identity
Simplify the trace/replay by replacing the identity array with the
identity operator.
2008-11-04 10:43:02 +00:00
Chris Wilson
3664b32195 [trace] Remove more @..@ from Makefile.am
Use $(..) for make variable substitution as opposed to incorrectly using
@..@ for substitution by configure.
2008-11-04 10:42:49 +00:00
Behdad Esfahbod
310026ab42 [aclocal.dolt.m4] Fix build with bash versions <= 3.0 (bug #18363) 2008-11-04 01:51:06 -05:00
Chris Wilson
9021755012 [mime-data] Copy a reference to the mime-data on snapshotting.
Instead of doing a full-copy of the mime data (which can be 10K-100K,
or even larger) just copy a reference to the original mime to the
snapshot surface (as suggested by Behdad).
2008-11-03 23:45:12 +00:00
Chris Wilson
4f032ca35a [trace] Install cairo-trace.so into $(libdir)/cairo
Install the auxiliary library into the cairo subdirectory within the
lib path, so that it doesn't clutter $(libdir) and sets a precedent for
future auxiliary libraries.
2008-11-03 23:23:09 +00:00
Chris Wilson
c80a1c68c1 [configure] Make trace consistent.
Remove the debianism from the comments for HAVE_BFD and comply with
Behdad's guidelines on using  $(...) within Makefile.am.
2008-11-03 23:16:09 +00:00
Chris Wilson
43e2370b02 [test] Update extend-pad.
extend-pad was not a clear demonstration of the EXTEND_PAD mode, so revamp
it to show the filter extending a 4 pixel surface to cover the entire
output. However, this hides a discrepancy with the vector surfaces that we
cannot prevent the external renders from applying an interpolation to the
border pixels, so we copy the original test to extend-pad-border to check
the desired behaviour on boundary pixels.
2008-11-03 14:24:59 +00:00
Chris Wilson
b3462c5616 [test] Convert a few residual '-out.*'
Catch a few -out.* hiding in boilerplate.
2008-11-03 14:24:39 +00:00
Chris Wilson
34586860ef [trace] Big-endian compile fixes.
A few typos.
2008-11-03 12:11:14 +00:00
Chris Wilson
ca83df55a6 [trace] Wrap test surfaces.
Wrap the test surfaces to avoid crashes whilst tracing the test suite.
2008-11-03 11:46:31 +00:00
Chris Wilson
2c08f3f83b [trace] Autodetect -lbfd during configure
Stop being lazy and detect libbfd during configure.
2008-11-03 11:30:38 +00:00
Chris Wilson
8fc3d0ffeb [mime-data] Allow embedding of arbitrary mime-types.
Use the surface user-data array allow to store an arbitrary set of
alternate image representations keyed by an interned string (which
ensures that it has a unique key in the user-visible namespace).

Update the API to mirror that of cairo_surface_set_user_data() [i.e.
return a status indicator] and switch internal users of the mime-data to
the public functions.
2008-11-03 11:24:12 +00:00
Chris Wilson
afef83a1fa Compile tidy.
Fix a few minor compiler warnings.
2008-11-03 11:24:11 +00:00
Chris Wilson
f77723fc88 [pdf] Missing status check.
Check that stream was successfully opened before attempting to write to
it.
2008-11-03 11:24:11 +00:00
Chris Wilson
04e3bb932e [trace] Emit set_mime_data().
Wrap the new cairo_surface_set_mime_data() function.
2008-11-03 11:24:07 +00:00
Chris Wilson
350fa7b98e [trace] Fix boundary terminations
Don't increment the terminator!
2008-11-03 09:36:53 +00:00
Chris Wilson
f3cbc5cf45 [trace] Use utf8 len in show_text_glyphs().
Honour the parameter specifying the length of the utf8 string when
emitting show_text_glyphs.
2008-11-03 09:36:39 +00:00
Adrian Johnson
1685bbee1b test/README: fix typo 2008-11-02 20:12:30 +10:30
Adrian Johnson
540ac11113 type1-subset: return unsupported on FT errors
and let type1-fallback handle it. This fixes the bug reported by
Peter Weilbacher in
http://lists.cairographics.org/archives/cairo/2008-October/015569.html
2008-11-02 20:12:30 +10:30
Adrian Johnson
3707178fa4 PDF: Implement JPEG image embedding 2008-11-02 20:12:29 +10:30
Adrian Johnson
3c684347f4 Add cairo_surface_set_mime_data()
Currently only handles jpeg data.
2008-11-02 20:12:29 +10:30
Adrian Johnson
a39a4f52ac PS: meta-surface patterns with EXTEND_PAD are unsupported
We have to use fallback images for this.
2008-11-02 20:12:29 +10:30
Adrian Johnson
19ee13ca2b PS: Implement EXTEND_PAD for image patterns
Images with EXTEND_PAD are painted into a new image the size of the
operation extents. The new image is then embedded in the PS file with
the pattern matrix adjusted to ensure the image origin is in the
correct location.
2008-11-02 20:12:29 +10:30
Adrian Johnson
e639b53671 PDF: meta-surface patterns with EXTEND_PAD are unsupported
We have to use fallback images for this.
2008-11-02 20:12:29 +10:30
Adrian Johnson
6c92edd9a3 PDF: Implement EXTEND_PAD for image patterns
Images with EXTEND_PAD are painted into a new image the size of the
operation extents. The new image is then embedded in the PDF file with
the pattern matrix adjusted to ensure the image origin is in the
correct location.
2008-11-02 20:12:29 +10:30
Adrian Johnson
d146cb4056 PDF: Store the operation extents in each pattern
The extents will be used by EXTEND_PAD patterns as well as any other
pattern that can benefit from knowing the extents of the operation it
will be used with.
2008-11-02 20:12:29 +10:30
Adrian Johnson
fb7cfdd94d Make meta-surface store and replay extents of each operation
To be able to provide the extents of each operation to the backend
during the render phase the meta-surface needs to store the extents
computed by the analysis surface during the analysis phase.

The extents argument is either a pointer to the extents of the operation
stored in the meta-surface or NULL. During analysis the analysis surface
writes the extents to the meta-surface. During the render phase the extents
is made available to paginated surface backends.
2008-11-02 20:12:29 +10:30
Adrian Johnson
d682d275b9 Add an extents argument to the high level surface backend functions
Add a "cairo_rectangle_int_t *extents" argument to to the following
backend functions:
  paint
  mask,
  stroke
  fill
  show_glyphs
  show_text_glyphs

This will be used to pass the extents of each operation computed by
the analysis surface to the backend. This is required for implementing
EXTEND_PAD.
2008-11-02 20:12:22 +10:30
Adrian Johnson
ed2081d974 Specify a background color for XFAIL text
To improve readability on terminals with a white background.
2008-11-02 15:05:07 +10:30
Behdad Esfahbod
81c3009c07 [boilerplate/Makefile.win32] Only build source files, not headers 2008-10-31 16:45:58 -04:00
Behdad Esfahbod
d5f88c2802 [.gitignore] Add 2008-10-31 13:43:37 -04:00
Chris Wilson
49bd253fd3 [tessellator] Refine the math comments.
First of a simple substitution for -?-, as they are very confusing in
context with other minus signs floating around.

Carl has promised to go over these docs with me at the HackFest in order
to improve them (and verify them).
2008-10-31 16:40:49 +00:00
Chris Wilson
ab8a0bfd82 Add a COPYING file to each aux. source directory
Include a COPYING inside perf/, test/, util/ to clarify the licensing
conditions beneath the respective directories. This is because cairo
itself (libcairo.so) is LGPL-2.1/MPL-1.1 but that only relates to src/.
The auxiliary source files are under a mix of free licenses and we wish to
be clear just what license applies to each file.

In particular, cairo-trace needs to include the GPL terms and conditions.
2008-10-31 16:14:14 +00:00
Chris Wilson
c554f18d78 [util] Add cairo-trace.
This tool can be used to trace all the cairo function calls made by an
applications.  This is useful for either extracting a test case triggering
a bug from an application, or simply to get a general idea of how an
application is using cairo.

After make install, cairo-trace program arguments, will print out all the
cairo calls to the terminal and also capture theme in ./program.$pid.trace

The format of the output is CairoScript, watch this space for more
cairo-script tools!
2008-10-31 15:37:58 +00:00
Chris Wilson
992f74d884 [test] Use '.' as the field separator in the names
We frequently use '-' within the test name or format name and so we
encounter confusion as '-' is also used as the field separator. At times
this has caused a new test to break an old test because the new test would
match one of the old test's target specific reference images. So switch
everything over to use '.' between fields (test name, target, format,
subtest, etc.).
2008-10-31 13:50:55 +00:00
Chris Wilson
e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00
Chris Wilson
8457972d40 [type3] Whitespace.
Tightly scope the output stream.
2008-10-31 02:25:22 +00:00
Chris Wilson
08f4d49a94 [xlib] Intialise clip_dirty.
Eeek, forgot to set the clip_dirty to 0 on construction.
2008-10-31 02:25:22 +00:00
Chris Wilson
b722d5b2b9 Merge branch '1.8' 2008-10-31 02:24:25 +00:00
Chris Wilson
710f7d30d3 [scaled-font] Fix typo that prevented meta_surface lookup.
test/text-glyph-range was crashing since we requested the meta_surface but
the glyph wrongly believed it already had the meta_surface but was
checking for a path instead.
2008-10-31 02:24:05 +00:00