Commit graph

2968 commits

Author SHA1 Message Date
Kjartan Maraas
1002d01683 Remove unused variables (#7963) 2007-01-11 17:59:16 -05:00
Behdad Esfahbod
eff6d3c7a0 [cairo-type1-subset] Do not use an array of pointers, to reduce .data size
We use a string pool plus lookup indices tables now, generated by perl code
embedded before the tables.  The table in question is the default PS encoding
table, so no changes are expected in the future.
2007-01-10 16:54:43 -05:00
Soeren Sandmann
cf1d95e714 Add SRC and IN implementations to avoid CompositeGeneral in some cases hit by PDF rendering
The patch implements a few more operations with special cases MMX
code. On my laptop, applying the patch to cairo speeds up the
benchmark (rendering page 14 of a PDF file[*]) from 20.9 seconds
to 14.9 seconds, which is an improvement of 28.6%.

[*] http://people.redhat.com/jakub/prelink.pdf

This also benefits the recently added unaligned_clip perf case:

image-rgb  unaligned_clip-100 0.11 -> 0.06: 1.65x speedup
▋
image-rgba unaligned_clip-100 0.11 -> 0.06: 1.64x speedup
▋
2007-01-09 15:37:26 -08:00
Carl Worth
d5531c4f50 Add unaligned_clip perf case courtesy of Jeff Muizelaar
Conflicts:

	perf/Makefile.am
	perf/cairo-perf.c
	perf/cairo-perf.h
2007-01-09 14:31:22 -08:00
Brian Ewins
504cbdae37 [ATSUI] [2/2] Implement CAIRO_SCALED_GLYPH_INFO_SURFACE support.(#9467)
All non-quartz surfaces need to fall back to using glyph surfaces,
in order to clip correctly. This second patch implements glyph
surface support, correcting the unclipped text seen in the clip-operator
test.
2007-01-08 22:57:02 +00:00
Brian Ewins
77171cb8e2 [ATSUI] [1/2] Implement CAIRO_SCALED_GLYPH_INFO_SURFACE support.(#9467)
All non-quartz surfaces need to fall back to using glyph surfaces,
in order to clip correctly. The bug being fixed is visible in the
clip-operator test. This first patch takes out direct rendering support 
for non-quartz surfaces, causing all image tests to fail.
2007-01-08 22:37:22 +00:00
Jinghua Luo
116ae23fc6 Glitz: position large glyph correctly.
I introduced this bug while fixing test glyph-cache-pressure
(commit 3b1d0d3519). I also changed
GLYPH_CACHE_MAX_HEIGHT and GLYPH_CACHE_MAX_HEIGHT to 96, then we
still can cache at least 28 glyphes per font(512 ^ 2 / 96 ^ 2).
This make us not hit slow path too much and improve performance
a lot.
2007-01-08 16:51:28 +08:00
Brian Ewins
aed4029a10 [ATSUI] Refactor code for creating CGBitmapContexts from cairo surfaces.
No changes to test output. This just prepares code for reuse when 
implementing support for CAIRO_SCALED_GLYPH_INFO_SURFACE.
2007-01-08 01:23:16 +00:00
Brian Ewins
9a005c6221 [ATSUI] correct the rotation of glyph paths. (#9378)
This fixes a bug visible in the text-rotate test when 
CAIRO_TEST_GENERATE_REFERENCE_IMAGE is defined.
2007-01-08 01:07:44 +00:00
Brian Ewins
58265f3508 [ATSUI] Select Bitstream Vera and CSS font families reliably.
Previously the code selected using the family name; this intermittently
selected a bold or italic face instead of the regular one. The new approach
is to select the desired font instance directly if possible, and only use
the family lookup if that fails. This isn't 100% correct but should always
provide the correct font instance for CSS generic font families. The
bug was sometimes reproducible with the select-font-face test.
2007-01-08 00:54:38 +00:00
Brian Ewins
22e271d687 [perf/cairo-perf-diff] Pass CAIRO_AUTOGEN_OPTIONS to autogen.
Makes it was possible to run cairo-perf-diff with different
configurations, eg with quartz enabled.
2007-01-07 18:12:40 +00:00
Brian Ewins
d30b1bf157 [ATSUI] Scale glyphs using _cairo_matrix_compute_scale_factor (#9350)
This bug shows up in the text-rotate test.
2007-01-07 13:46:00 +00:00
Behdad Esfahbod
ded08256ef Spell check the docs 2007-01-07 02:08:15 -05:00
Alp Toker
caa3c2e1e7 Fix various code/comment typos 2007-01-07 01:35:15 -05:00
Carl Worth
c96a71e709 Restrict _clip_and_composite_trapezoids to destination extents
This is a fix for a huge performance bug (as measured by perf/long-lines).
Previously, if no explicit clip was set, _clip_and_composite_trapezoids
would allocate a mask as large as the trapezoids and rasterize into it.
With this fix, it restricts the mask by the extents of the destination
surface.

This doesn't address the identical performance problem with the xlib
backend, which is due to a very similar bug in the X server.

image-rgb  long-lines-uncropped-100 465.42 -> 5.03: 92.66x speedup
█████████████████████████████████████████████▉
image-rgba long-lines-uncropped-100 460.80 -> 5.02: 91.87x speedup
█████████████████████████████████████████████▍
2007-01-05 16:50:11 -08:00
Carl Worth
cc11c264ec Add long-lines perf case
This shows some very bad slowness for lines that are mostly
offscreen (like 100x slower than just drawing the visible
portion).
2007-01-05 16:50:11 -08:00
Behdad Esfahbod
11dd9eab69 [src/Makefile.am] Don't remove cairo-features.h in "make clean"
That's generated by configure, so it should be removed by "make distclean".
2007-01-04 23:36:32 -05:00
Jonathan Watt
d4a58b2437 Remove WINVER from public header file 2007-01-04 16:46:22 +01:00
Peter Weilbacher
e6369f9478 Fix for OS/2 display drivers that cannot handle 32bit output (feed them a 24bit buffer instead). 2007-01-04 00:11:44 +01:00
Dan Amelang
26b06516a7 Use the "-" option (instead of "-a") when calling "strings"
This is needed to fix the AX_C_FLOAT_WORDS_BIGENDIAN macro on Mac OS X 10.2,
which was brought up here:

    https://bugs.freedesktop.org/show_bug.cgi?id=9124
2006-12-30 21:14:14 -08:00
Behdad Esfahbod
eafd6e454a In _cairo_scaled_font_text_to_glyphs, bail if text is zero-length (#5177) 2006-12-28 20:01:18 -05:00
Behdad Esfahbod
ab29396ef9 [test] Add new test text-zero-len (#5177)
The test passes an empty string to cairo_show_text, cairo_text_path, and
cairo_text_extents, and NULL and an invalid pointer, with zero num_glyphs to
cairo_show_glyphs, cairo_glyph_path, and cairo_glyph_extents.
2006-12-28 20:00:16 -05:00
Jinghua Luo
2d30161e89 glitz: fix all compiler warnings in glitz backend. 2006-12-24 18:31:02 +08:00
Behdad Esfahbod
8fd7328ebb Don't call into backends if num_glyphs is zero (#5177)
Just return success in _cairo_scaled_font_show_glyphs() and
_cairo_surface_show_glyphs() if num_glyphs is zero.
2006-12-23 17:08:04 -05:00
Behdad Esfahbod
3212fc4f0f [cairo-scaled-font] Skip invisible glyphs (like space) in glyph_extents() (#9422)
When computing extents for an array of glyphs, just taking min/max of x/y for
the bounding box of each glyph doesn't work.  The reason being that an
invisible glyph (like the space glyph) should not modify the resulting
extents, but it will.  So now we skip invisible glyphs.
2006-12-23 17:00:00 -05:00
Brian Ewins
8368fa2fcf [test/text-rotate] Use the same text for measuring and printing 2006-12-23 15:44:16 -05:00
Brian Ewins
261d6b805c [ATSUI] Compute glyph extents from the bounding boxes of their paths (#9350) 2006-12-23 15:34:16 -05:00
Carl Worth
ee01bd9e17 Bump version to 1.3.11 after making 1.3.10 snapshot 2006-12-23 00:47:40 -08:00
Carl Worth
b35cfde7f0 Increment cairo version to 1.3.10 (and libtool versioning to 12:3:10) 2006-12-23 00:35:14 -08:00
Carl Worth
d6895af9f1 NEWS: Add notes for 1.3.10 snapshot 2006-12-23 00:29:21 -08:00
Carl Worth
f46fcd1847 Annoying template churn 2006-12-23 00:29:01 -08:00
Carl Worth
c08bd4ec37 Ignore another test case binary 2006-12-23 00:03:31 -08:00
Carl Worth
ba531642f7 Add optimization for rectilinear stroke
This custom stroking code allows backends to use optimized region-based
drawing operations for rectilinear strokes. This results in a 5-25x
performance improvement when drawing rectilinear shapes:

image-rgb          box-outline-stroke-100 0.18 -> 0.01: 25.58x speedup
████████████████████████▋
image-rgba         box-outline-stroke-100 0.18 -> 0.01: 25.57x speedup
████████████████████████▋
 xlib-rgb          box-outline-stroke-100 0.49 -> 0.06:  8.67x speedup
███████▋
 xlib-rgba         box-outline-stroke-100 0.22 -> 0.04:  5.39x speedup
████▍

In other words, using cairo_stroke instead of cairo_fill to draw the
same shape was 5-15x slower before, but is 1.2-2x faster now.
2006-12-22 17:59:20 -08:00
Carl Worth
b118911853 Put ft-text-vertical-layout-type1 back on the XFAIL list
I must not have the right font available, (test result is coming out
looking like the result of ft-text-vertical-layout-type3, Vera?).

We should switch this test to load a bundled font, (should do that for
all font-using tests, too).
2006-12-22 17:59:20 -08:00
Carl Worth
7b1509f4f3 Reimplement path.has_current point as a 1-bit bitfield 2006-12-22 17:59:20 -08:00
Carl Worth
9d2d3b95e3 Add new rectilinear-stroke test
This is in preparation for an optimized implementation of cairo_stroke
for rectilinear paths.
2006-12-22 17:59:20 -08:00
Jinghua Luo
39ce31ade6 Glitz: fix a potential use after free bug in _cairo_glitz_surface_old_show_glyphs.
There is a race condition between glyph unlocking and glyph cache thawing.
Moving down _cairo_scaled_font_thaw_cache a few lines fixes the problem and make
crashes go away.
2006-12-22 22:05:20 +08:00
Behdad Esfahbod
344901a1a1 [test] Fix typo in test comment, again 2006-12-20 18:15:22 -05:00
Carl Worth
473ae3aa95 Rename remaining cairo_path_data to cairo_path in function names, etc. 2006-12-19 13:10:14 -08:00
Carl Worth
def0e6d41d Rename cairo-path-data.c to cairo-path.c (and similar) 2006-12-19 13:10:06 -08:00
Carl Worth
13c143bb52 Rename cairo-path.c to cairo-path-fixed.c 2006-12-19 13:10:00 -08:00
Carl Worth
267afe7be3 test/.gitignore: Ignore binarries for some recently added tests 2006-12-18 16:05:42 -08:00
Brian Ewins
f3b9f486cd [ATSUI] Use screen metrics instead of ideal metrics to compute glyph extents
The glyph extent computation was totally busted.  It was using "logical"
extents and it was not correctly handling rotations, etc.  It all looks a lot
better now.
2006-12-17 22:26:02 -05:00
Behdad Esfahbod
c6ec6ed696 [tests/ft-text-vertical-layout-type3] Remove comment that this emits Type3 font
This test used to be named -truetype, which reflected the type of font used in
the test, in contrast to the -type1 test that uses a Type1 font.  However, we
renamed this test to -type3 to emphasize the fact that a TrueType subset is
not emitted for vertical fonts and a Type3 fallback font is generated.

Now things have changed: we try generating a Type1 fallback font which is what
is happening for this test.  Moreover, the -typ1 test also is generating a
Type1 fallback font since the Type1 subset font is not useful for vertical
fonts.
2006-12-17 18:42:05 -05:00
Behdad Esfahbod
50efd71935 [type1-subset] Return UNSUPPORTED for vertical fonts
This fixes the last problem with vertical fonts in PS/PDF.  As such, remove
ft-text-vertical-layout-type1 test from XFAIL and add PS-specific ref image
to pass.
2006-12-17 18:37:01 -05:00
Behdad Esfahbod
207e38e8ba [PS] Fix typo in comment emitted for Type1 fallback font subsets 2006-12-17 18:25:48 -05:00
Behdad Esfahbod
0bea2ce7f7 [pdiff] Define _GNU_SOURCE to get correct symbols out of <math.h>
math.h does not define __USE_ISOC99 otherwise.
2006-12-17 14:32:08 -05:00
Behdad Esfahbod
2ca6a767ee [pdiff] Don't use float math functions if not using gcc with C99
The float version of many math functions were introduced in C99, and were
causing compile failure on systems like OS X.  We now define them to their
double variant if __USE_ISOC99 is not defined.  We may want to expand it later
to cover non-gcc compilers too, but since this is pdiff only, it's not really
important.
2006-12-17 14:24:57 -05:00
Behdad Esfahbod
0d9b2d0415 [configure] Use AC_C_INLINE to correctly define inline
Previously we were defining a symbol INLINE and use that in one place, while
other places were using straight inline.  With the AC_C_INLINE macro we can
just leave it to autoconf to correctly choose what inline should be defined
to.
2006-12-17 14:09:15 -05:00
Behdad Esfahbod
294d1a3c4e [test] Add ft-text-vertical-layout-type3-ps-argb32-ref.png
The PS output for ft-text-vertical-layout-type3 looks correct, except for some
antialiasing mismatch.  Ading ref image to fix this, and so, remove the test
from XFAIL.
2006-12-17 01:07:41 -05:00