Commit graph

8111 commits

Author SHA1 Message Date
Benjamin Otte
ebc9cc46fe gl: Use right format
The internal format should always be GL_RGBA.
2010-04-15 17:43:32 +02:00
Chris Wilson
4142f0836d gl: Handle component-alpha ADD
A simple extension to the component-alpha OVER [as ca-ADD is just the
second pass in ca-OVER] to support amalgamation of glyph masks. This
speeds up firefox-36 by ~5% on g45.

Before:
  firefox-36-20090611   76.185
After:
  firefox-36-20090611   72.863
2010-04-15 09:21:05 +01:00
Benjamin Otte
a4bae1956b gl: Really don't write error status to the inert object. 2010-04-14 22:46:34 +02:00
Benjamin Otte
5fed41ee2b test: Add test checking that all setters properly check surface->status
In particular, make sure that the setters when called on a const nil
surface don't try to set surface->status.
2010-04-14 22:45:18 +02:00
Chris Wilson
6826f02001 gl: Don't write error status to the inert object.
Reported-by: Benjamin Otte <otte@redhat.com>
2010-04-14 20:26:48 +01:00
Chris Wilson
3814855a64 script: Flush prior to modifying the image data. 2010-04-14 20:22:14 +01:00
Chris Wilson
03f7bfc351 rtree: Remove the false assert upon collapse. 2010-04-14 20:14:39 +01:00
Chris Wilson
b0383d0cd2 svg: Don't write error status to the inert object.
Reported-by: Benjamin Otte <otte@redhat.com>
2010-04-14 19:42:20 +01:00
Chris Wilson
5274b63adb ps: Don't write error status to the inert object.
Reported-by: Benjamin Otte <otte@redhat.com>
2010-04-14 19:42:20 +01:00
Chris Wilson
45d23b8a79 pdf: Don't write error status to the inert object.
Reported-by: Benjamin Otte <otte@redhat.com>
2010-04-14 19:42:16 +01:00
Chris Wilson
4351304b51 Win32 features update. 2010-04-14 19:31:35 +01:00
Chris Wilson
bd17b898b1 surface: Propagate the error status to _cairo_surface_get_device()
If the surface is in error, the appropriate action is report the error
using an inert error cairo_device_t.

Reported-by: Benjamin Otte <otte@redhat.com>
2010-04-14 19:31:35 +01:00
Chris Wilson
005596907f xlib: Don't operate on an error object inside setters.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=599574

The backend API manipulated the surface prior to checking whether it was
an inert error surface - and in the event of an error surface, tried to
overwrite it's error status.
2010-04-14 19:31:31 +01:00
Chris Wilson
8afd4e4c3d hull: _cairo_hull_vertex_compare() return 0 for identical elements
Andreas Falkenhahn reported a bizarre situation with some
implementations of qsort that actually compare the same elements and
require the comparator to return 0. So be it.

Reported-by: Andreas Falkenhahn <andreas@airsoftsoftwair.de>
2010-04-13 17:56:14 +01:00
Chris Wilson
d95037db99 cache: Tidy _cairo_cache_shrink_to_accommodate()
There is no need to shrink the cache if we add an entry of size 0, so
don't by moving the guards in _cairo_cache_shrink_to_accommodate() to the
callers.
2010-04-11 21:06:53 +01:00
Chris Wilson
e6309c6307 xcb: Use normal finish to decouple from surface cache.
Hook into the standard finishing process for a more robust cache removal
mechanism. firefox was able to trigger some double free asserts
otherwise.
2010-04-11 21:06:53 +01:00
Andrea Canciani
e425c44e9c boilerplate: Compile xlib without xrender
cairo_boilerplate_xlib_surface_disable_render() is not defined when
compiling without XRender, but it was used nonetheless. Replace it
with an empty stub when XRender is not available.
2010-04-10 18:28:42 +02:00
Andrea Canciani
061ea78ad2 perf: Correct cairo-perf-diff syntax
{ cmd-list; } seems to literally be the required syntax. Blanks and
';' are both mandatory.
2010-04-10 18:25:25 +02:00
Chris Wilson
6986970ea5 clip: Compile fix for previous clip.
PEBKAC.
2010-04-10 17:05:38 +01:00
Chris Wilson
0899852c97 clip: Compare the whole clip when testing for equality.
Should fix test/clip-contexts
2010-04-10 16:03:14 +01:00
Chris Wilson
557016a86a test: Add clip-contexts
This should exercise a bug found by Jeff Muizelaar that
cairo-surface-clipper was mistakenly thinking that clip operations on a
second context was a no-op as the topmost clip path matched that of the
previous context.
2010-04-10 16:03:14 +01:00
Chris Wilson
a9f5064933 script: Another RGB16_565 warning. 2010-04-10 16:03:14 +01:00
Adrian Johnson
42b5cac766 PDF-operators: ensure text operations flushed before emitting clip 2010-04-10 22:15:01 +09:30
Chris Wilson
c004800fae script: Compile without FT_FONT 2010-04-07 22:50:34 +01:00
Chris Wilson
bdf8f50ada script: Another RGB16_565 warning. 2010-04-07 22:50:21 +01:00
Chris Wilson
f5f6431787 perf: Switch between micro and trace benchmarks for cairo-perf-diff 2010-04-07 22:50:15 +01:00
Andrea Canciani
70ca0040fd Actually check for memory allocation failure
Clang static analyzer signals "Dereference of null pointer" in case
the malloc returns NULL, as the code is checking the wrong pointer.
2010-04-07 22:58:36 +02:00
Benjamin Otte
d7f71ac5c2 region: Make the 2nd argument to intersect and union const 2010-04-07 22:04:39 +02:00
Kristian Rietveld
ded3a9639b quartz: Define cairo_quartz_float_t and use instead of float
On Mac OS 10.6 and newer cairo_quartz_float_t is defined to be a
CGFloat, resolving issues with the 64-bit builds.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=25814
2010-04-04 12:34:29 +02:00
Andrea Canciani
7c2c3f621f Correct masking optimization
In _cairo_surface_mask() there was an invaild optimization (it failed
for surfaces without alpha content). Using _cairo_pattern_is_clear()
is the correct way to evaluate if a pattern is clear.

Fixes clear-source
2010-04-03 22:57:19 +02:00
Chris Wilson
24fc36c10f script: Fix endian encoding of '<|' length.
Andrea found and fixed (and updated all the traces!) an endian bug where
we were encoding a 32bit length inside the compressed string stream.
However, this one inside the script backed escaped his notice.
2010-04-02 08:51:03 +01:00
Chris Wilson
697094488c test: Add inverse text
This is exercising a bug that I have introduced either in the xcb
backend or in the driver in my experimental branches. So simple, yet so
wrong.
2010-04-02 08:51:03 +01:00
Chris Wilson
fe610d559c perf/micro: Show megapixel fill rate during paint. 2010-04-02 08:51:03 +01:00
Chris Wilson
8f7078eba7 boilerplate: Allox xlib-fallback to build without RENDER
This surface doesn't use RENDER and should produce the same results
when cairo-xlib is compiled without any support for RENDER.
2010-04-01 20:42:44 +01:00
Chris Wilson
d209b40c64 xlib: Rearrange xrender stubs to restore compilation without xrender.h 2010-04-01 20:36:15 +01:00
Behdad Esfahbod
db4dbb3834 Improve doc syntax check to allow inline macro docs 2010-04-01 01:53:53 -04:00
Chris Wilson
00101fa716 configure: check -lrt for shm_open()
OS/X includes shm_open() in libc, and fails to link if -lrt is
specified. So perform the appropriate configure time magic.
2010-03-31 16:20:13 +01:00
Andrea Canciani
a81d347c24 perf: Fix timestamp computation on MacOS X
The OIL routines don't work as expected on MacOS X. The operating
system gives access to the timestamp counter through the function
mach_absolute_time.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-31 16:13:05 +02:00
Andrea Canciani
55ce0b7748 script: Fix script scanner endianness
The script interpreter was reading the length of compressed data as
an host-endian uint32_t, thus making cairo-script able to correctly
read traces that were produced on the same endianness as the one they
ran upon, but unsuitable for portabile cairo-scripts.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-31 16:13:05 +02:00
Andrea Canciani
4f617eaf77 trace: Fix trace endianness
Trace files were using host-endian to represent the length of
compressed data, making the trace format not portable.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-31 13:13:36 +02:00
Andrea Canciani
35f19bc084 pattern: Fix _gradient_is_opaque() for zero stops
_gradient_is_opaque() previously returned TRUE for gradient with
no stops, triggering a false optimization in _cairo_gstate_mask().

Fixes test/gradient-zero-stops-mask

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-31 12:52:09 +02:00
Andrea Canciani
01e1821942 test: Add gradient-zero-stops-mask
Add a test to check that gradient with no stops are not considered
opaque by gstate (and thus masking with them is not optimized to
paint).
2010-03-31 12:14:25 +02:00
Chris Wilson
ce3ad6f41e xlib: Avoid multiple evaluations inside bswap_*() macro.
Fixes:
  Fonts are not readable if remote display to a machine with different
  endian.
  https://bugzilla.mozilla.org/show_bug.cgi?id=526977

Reported-and-tested-by: Ginn Chen <Ginn.Chen@Sun.COM>
2010-03-31 08:21:17 +01:00
Chris Wilson
be4ffa9df2 doc: Fix some missing '%' in gtk-doc comments 2010-03-30 18:31:38 +01:00
Chris Wilson
7ab350378e Silence enumeration warnings following addition of RGB16_565 2010-03-30 18:31:34 +01:00
Chris Wilson
d901692a55 scaled-glyph: Allow removal info fields.
Pushed a fraction of a second too soon... Update the
scaled_glyph->has_info if the backend clears any field as well.
2010-03-30 15:31:32 +01:00
Chris Wilson
5c4b6d520b xcb: Cache whether we have already check a glyph for size.
Avoid repeated cairo_scaled_glyph_lookup() and checking of sizes if we
have already seen this glyph in this run.
2010-03-30 15:28:37 +01:00
Chris Wilson
1c76e3e9ad scaled-font: Optimize cairo_scaled_font_lookup()
By tracking which fields of information are already available on the
scaled_glyph we can more efficiently determine if we already have the
requested fields. This reduces from about 6 conditionals to one, and
reduces the function overhead by ~20% -- which has a measurable
improvement on glyph benchmarks.
2010-03-30 15:28:37 +01:00
Chris Wilson
d2ec151e49 perf/micro: Exercise different sizes and antialising modes with glyphs 2010-03-30 15:28:37 +01:00
Chris Wilson
72481acf0d perf: Compute ops per second
Provide a hook for the test to be able to compute the number of ops per
second. For instance, the glyphs test uses it to report the number of
kiloglyph per second Cairo is able to render.
2010-03-30 15:28:37 +01:00