Commit graph

9818 commits

Author SHA1 Message Date
Chris Wilson
ffbf6158be perf: Add an a1-pixel variant
Just to measure the overhead and differences when switching between
antialiasing paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 10:13:40 +01:00
Chris Wilson
9ab9d635cd test: Add ref image for random-clip
After applying geometric clip intersection, this is the acceptable
result.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 23:08:19 +01:00
Chris Wilson
8f9691f2b7 test: Fix ref images for a1-clip-*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 23:06:31 +01:00
Chris Wilson
472e4515de image: fix compilation of spans with LERP 2011-09-14 20:21:08 +01:00
Chris Wilson
872e1c87b3 skia: fix compilation 2011-09-14 20:21:03 +01:00
Chris Wilson
cf71821a33 mono: Amalgamate adjacent spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:22:24 +01:00
Chris Wilson
db41096b38 perf/micro: Add the PS tiger as a measure for the antialias hints
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:22:24 +01:00
Chris Wilson
9f605b0c84 test: Add the PS tiger
The classic tiger's head; a simple example of a reasonably complex shape
consisting of multiple layers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:10:22 +01:00
Chris Wilson
8a80bbf78d image: Adapt to updated pixman lerp operators
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:10:22 +01:00
Uli Schlachter
e3131242b2 xlib-xcb: Make this compile again
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-14 15:50:19 +02:00
Uli Schlachter
af11d26752 xcb: Remove some dead code
surface->use_pixmap always had the value 0. This code is taken from cairo-xlib.
However, in cairo-xlib use_pixmap is set to 20 if XGetImage() fails.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-14 15:21:37 +02:00
Uli Schlachter
cd69c8ef68 cairo_clip_path_t: Remove extents
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-14 15:21:37 +02:00
Chris Wilson
7cf7ee5e29 traps: Skip compositing an empty bounded regions
Fixes the cairo-xlib crash with tighten-bounds. (I thought I had fixed
it earlier, but I was obviously wrong.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 12:45:59 +01:00
Adrian Johnson
dc2ed6dca2 Refresh some pdf/ps ref images 2011-09-13 22:29:56 +09:30
Chris Wilson
3e655f0819 traps: Send unaligned boxes as trapezoids
According to the little fishies this performs significantly better.
As a bonus, it did not handle overlapping boxes correctly...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 12:31:14 +01:00
Chris Wilson
05a73434fc perf/stats: Avoid overflow when summing time-squared
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 12:30:58 +01:00
Adrian Johnson
8218f5278e ps: turn off debug 2011-09-13 18:52:50 +09:30
Chris Wilson
4f2c7b8cf8 mono-scan-converter: Decrement height as we skip straight edges
Fixes paint-clip-fill-mono.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 15:49:13 +01:00
Chris Wilson
a6a48e0559 test: Update ref images
First pass after the recent turmoil in clip and antialias handling.
2011-09-12 15:44:47 +01:00
Chris Wilson
0f26f75eda perf/micro: Add measurement of setting the pixel directly using pixman
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 15:44:46 +01:00
Adrian Johnson
7b6586a738 scaled-subsets: ensure different glyphs with same utf8 mapping are not merged together
If a glyph maps to a latin char that is already assigned in the latin
subset, put the glyph in a non latin subset.
2011-09-12 22:04:06 +09:30
Adrian Johnson
497258a4cf ft: fix warning 2011-09-12 22:01:09 +09:30
Adrian Johnson
b0d9b4ce53 pdf: add status check 2011-09-12 21:53:59 +09:30
Chris Wilson
65a954d5ba test-surfaces: compilation fixes
Update to the last minute changes in the traps compositor API.

And so it begins.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 11:39:59 +01:00
Chris Wilson
af9fbd176b Introduce a new compositor architecture
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
2011-09-12 08:29:48 +01:00
Adrian Johnson
0540bf384a ps: improve formatting of fallback image comment 2011-09-11 00:45:09 +09:30
Adrian Johnson
2d887d99c7 ps: use reusable stream for mesh pattern data
File data used by a shading pattern must reusable since the pattern
may read the file multiple times. As currentfile is not reusable, use
the /ReusableStreamDecode to make it reusable.
2011-09-11 00:45:09 +09:30
Chris Wilson
d8ac76bcec perf/Makefile.am: Add missing '\' line continuation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 19:43:48 +01:00
Paulo Zanoni
ee15e030d8 cairo-test-runner: don't leak argv
If CAIRO_TESTS is set, argv will be replaced by a xmaloc'ed variable. We
need to free it.

This can be easily detected by running:
CAIRO_TESTS=user-font make check-valgrind TARGETS=image

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 18:44:18 +01:00
Paulo Zanoni
572479ec20 test/README: add missing "S"
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 18:43:18 +01:00
Paulo Zanoni
669242c2c8 test: fix append_argv()
When I ran "CAIRO_TESTS=a1-bug make test", no test executed because of a
bug in append_argv(). The "olen" variable was assuming that we always
only append a single argument to argv and the resulting argc was also
wrong.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 18:43:15 +01:00
Adrian Johnson
166be70cb8 pdf: latin text must use character codes in the toUnicode CMap, not glyph indices 2011-09-09 22:30:49 +09:30
Adrian Johnson
80fc566eaf cff: strip subset tag when reading font name
so we don't end up with two subset tags in the font name when cairo
appends its own subset tag.
2011-09-08 19:29:16 +09:30
Adrian Johnson
7dca94fbc4 pdf: use interpolate in image smask 2011-09-06 23:50:46 +09:30
Adrian Johnson
d47e05f8c2 ps/pdf: fix the polarity of stencil masks 2011-09-06 23:41:12 +09:30
Adrian Johnson
a7ed3dd914 ps: support stencil masks
When the mask is an A1 image (or can be reduced to A1) use the imagemask operator.
2011-09-06 23:21:35 +09:30
Adrian Johnson
c34d6adfcc pdf: use _emit_smask() instead of _emit_imagemask to emit stencil mask
Now that _emit_smask() can generate A1 masks, the _emit_imagemask()
code can be removed and emit_smask() used instead. An additional
benefit is stencil masks can be generated from ARGB32 and A8 images as
well as A1 providing that the analysis of the transparency shows that
the image is opaque or has bilevel alpha.
2011-09-06 21:36:54 +09:30
Adrian Johnson
d6d3825b51 ps: each row of 1-bit image data needs to begin on a byte boundary 2011-09-05 22:31:53 +09:30
Adrian Johnson
3614892d8d pdf: each row of 1-bit image data needs to begin on a byte boundary 2011-09-05 22:30:15 +09:30
Adrian Johnson
42fecf37dc pdf: use ink extents in content stream XObjects 2011-09-05 21:36:43 +09:30
Adrian Johnson
d1f146b54f pdf: use ink extents for pattern bbox 2011-09-05 21:22:12 +09:30
Adrian Johnson
37a22669d8 pdf: use ink extents for smask bbox
There are some inkscape bugs reporting very slow rendering of inkscape
generated PDFs (inkscape uses cairo for PDF output). These bugs are
caused by cairo specifying a page sized bounding box in XObjects and
Patterns. PDF renderers usually use the BBox as the image size when
compositing. As PDFs generated from SVG tends to use a lot of XObjects
and Patterns this can lead to very long rendering times.

These three patches tighten up all the BBoxes in PDF output.
2011-09-05 21:18:36 +09:30
Andrea Canciani
6ad63946d4 cairo-missing: Fix build
The cairo-missing code contains multiple typos and uses
_cairo_*alloc*() functions without including cairo-malloc-private.h
2011-09-04 16:23:37 -07:00
Andrea Canciani
ed84cb522c wideint: Fix build on suncc
"static cairo_private" means nothing and suncc complains loudly about
it. The visibility of _cairo_double_to_uint64() and
_cairo_uint64_to_double() should just be "static".
2011-09-04 16:23:37 -07:00
Andrea Canciani
01729606fb malloc: Fix build on suncc
cairo-malloc-private.h depends on malloc() and realloc() being
declared, hence it should include stdlib.h.
2011-09-04 16:23:37 -07:00
Andrea Canciani
761ef7ae8b cairo-missing: Fix and cleanup ssize_t type definition
The definition of ssize_t is needed in cairo-missing.h and can be
dropped from files which include it.
2011-09-04 16:23:37 -07:00
Andrea Canciani
60e04ff49e observer: Fix build on suncc
Returning a void value is an error on suncc and causes a warning on msvc:
cairo-surface-observer.c(1273) : warning C4098:
'_cairo_surface_observer_release_source_image' : 'void' function
returning a value
2011-09-04 16:23:36 -07:00
Jesse van den Kieboom
b0aec95c8e quartz: Rename declaration of _cairo_quartz_create_cgimage
The function was renamed in 81efbc1847
but the prototype was not updated.

Silences the warning:
cairo-quartz-surface.c:165: warning: no previous prototype for 'CairoQuartzCreateCGImage'

Along with 0c620080af, fixes
https://bugs.freedesktop.org/show_bug.cgi?id=40082
2011-09-03 09:15:48 -07:00
Uli Schlachter
968eb30bba xcb: Steal from the pending list for GetImage
Before using some piece of SHM again, we must be sure that the X11 server is no
longer working with it. For this, we send a GetInputFocus when we are done with
the SHM locally and will only use the memory again when the reply comes in.

However, if we are allocating the memory for SHM GetImage, then we can re-use
memory earlier, because the server processes requests in order. So it will only
start writing to the memory after it is done with earlier requests for this
memory. So instead of using GetInputFocus for synchronisation, the SHM GetImage
request will automatically do this for us.

Thanks to Chris Wilson for this idea.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-02 15:21:20 +02:00
Uli Schlachter
ea52556531 xcb: Fix fixup_unbounded_with_mask
This code was casting a pixman_box32_t* to cairo_box_t*. However, a box uses
fixed point numbers while the pixman box uses integers which means the result
was off by factor 256.

The fix is to replace the use of _cairo_boxes_limit() with
_cairo_boxes_init_with_clip(). However, this means this function no needs to be
passed a clip instead of a clip region which causes some minor changes to
_composite_boxes().

This improves the result for tighten-bounds again. Out of the tested
combinations, 10 are fixed by this. This bug was hit by code similar to this
(Repeating here since that test has so many different cases):

cairo_set_operator (cr, CAIRO_OPERATOR_IN);
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
cairo_rectangle (cr, 0, 0, SIZE, SIZE);
cairo_rectangle (cr, 0, 0, SIZE, SIZE);
cairo_rectangle (cr, SIZE / 4, SIZE / 4, SIZE / 2, SIZE / 2);
cairo_clip_preserve (cr);
cairo_fill (cr);

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-02 15:12:25 +02:00