Commit graph

4372 commits

Author SHA1 Message Date
Chris Wilson
653351cd2e [gl] Copy font options from image backend.
Enable hint metrics similar to the default image backend. However,
consider using the display stored in the GLX context to query the screen
default.
2009-07-22 07:38:24 +01:00
Chris Wilson
a2ac67274d [gl] Add warning about missing hook for XCloseDisplay(). 2009-07-22 00:05:07 +01:00
Chris Wilson
f2f42ec70a [gl] Apply pixel sample bias for spans 2009-07-22 00:01:22 +01:00
Chris Wilson
9e420f5d06 [gl] Another whitespace pass. 2009-07-21 23:46:40 +01:00
Chris Wilson
222fd8b49b Merge commit 'anholt/gl-span-renderer' 2009-07-21 23:42:34 +01:00
Chris Wilson
5471603b52 [gl] Use QUADS for drawing fill_rectangles() not TRIFAN
As each rectangle is independent, we need to draw the array using QUADS.
2009-07-21 23:38:05 +01:00
Chris Wilson
c3ef0c8d20 [gl] Whitespace
Ensure we leave a space between a function call and its parameters.
2009-07-21 23:31:30 +01:00
Chris Wilson
b71c27bf4e [gl] Remove dead code.
The loop between texture_setup() and clone_similar() should be
impossible, since every compositing backend should know how to clone an
image surface. cairo-gl is no longer an exception and so this code can
safely be removed.
2009-07-21 23:26:15 +01:00
Chris Wilson
c8cc6a205a [gl] Avoid temporary allocation of pixman trapezoids
When creating the trapezoid mask, avoid having to allocate a temporary
array to hold the converted pixman trapezoids by instead rasterizing each
trapezoid separately into the mask.
2009-07-21 23:08:39 +01:00
Chris Wilson
5deb8fa213 [gl] Construct a dummy window for the initial context
In order to make the initial context current we need a Drawable that
matches the context. In general, the RootWindow may not match the desired
context so we need to query the context and construct an appropriate
Drawable.
2009-07-21 22:54:21 +01:00
Chris Wilson
911482e5ae [gl] Constrain image sources to max texture size 2009-07-21 22:30:14 +01:00
Chris Wilson
1ae5942a3a Merge commit 'anholt/gl'
Conflicts:
	boilerplate/Makefile.sources
	boilerplate/cairo-boilerplate.c
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/Makefile.am
2009-07-21 22:28:44 +01:00
Chris Wilson
aac256b269 Compile fixes for mingw32.
Trivial typos found whilst using a cross-compiler.
2009-07-18 16:18:13 +01:00
Chris Wilson
52fa8760ae Add OpenVG backend.
Based on the work by Øyvind Kolås and Pierre Tardy -- many thanks to
Pierre for pushing this backend for inclusion as well as testing and
reviewing my initial patch. And many more thanks to pippin for writing the
backend in the first place!

Hacked and chopped by myself into a suitable basis for a backend. Quite a
few issues remain open, but would seem to be ready for testing on suitable
hardware.
2009-07-17 11:50:02 +01:00
Chris Wilson
34d5b862bc [xlib] Enable Render support for the extended PDF operators
With the latest 0.11 release of renderproto we now have the ability to
use the extended PDF operators via Render.
2009-07-16 14:18:13 +01:00
Tobias Hunger
01eec61f4f [qt] Remove use of unnecessary QBrush pointer
QBrush is a implicitly shared datastructure. There is on need to layer
"explicit pointer based sharing" atop of it.

Mozilla Bug #498871
2009-07-16 00:16:59 -04:00
Tobias Hunger
222c12cc4e [qt] Remove use of unnecessary QPen pointer
QPen is a implicitly shared class, so there is no need to do explicit sharing
via pointers.

Mozilla Bug #498873
2009-07-16 00:16:59 -04:00
Tobias Hunger
0797b2fcaa [qt] Cleanup some whitespace
Mozilla bug #498843
2009-07-16 00:16:59 -04:00
Tobias Hunger
d782ba04b7 [qt] Add method to flush qpainter
This is required for non-X11 rendering backends.

Mozilla bug #498910
2009-07-16 00:16:58 -04:00
Tobias Hunger
e713857b85 [qt] Move _opstr() inside the #if 0 to avoid warnings
Mozilla bug #498917
2009-07-16 00:16:58 -04:00
Tobias Hunger
4f9551e5e5 [qt] Reduce padding in cairo_qt_surface_t struct
Removes 4 bytes of padding (on a 32bit system) from the datastructure by
reordering the members.

Mozilla bug #498880
2009-07-16 00:16:57 -04:00
Chris Wilson
8c55ca9ebc [directfb] Silence compiler warnings.
Add extended blend mode to operator switch.
2009-07-14 16:54:51 +01:00
Chris Wilson
8ad3fca210 [glitz] Extended blend mode support
Ensure that we fallback given an extended operator.
2009-07-14 16:51:31 +01:00
Chris Wilson
333d37a60f [pdf] Silence copmiler.
Fill in missing case values to silence the compiler, and remind us should
we every add more operators in future.
2009-07-14 16:41:00 +01:00
Chris Wilson
710308c64e [script] Extended blend mode support. 2009-07-14 16:31:41 +01:00
Chris Wilson
100f0d94ee [cairo] Remove trailing spaces in comments.
vim highlights these errors making my screen go red and upsets me.
So they must die.
2009-07-14 16:30:36 +01:00
Emmanuel Pacaud
75736603d3 [SVG] Add extended blend modes. 2009-07-14 16:05:10 +02:00
Adrian Johnson
47af6cf280 [pdf] Add support for the extra blend modes
HSL modes support added by Benjamin Otte <otte@gnome.org>
2009-07-14 16:04:44 +02:00
Benjamin Otte
cf186d60b0 [xlib] Add support for new operators
This is of course just making sure fallbacks get used as Render does not support
the new operators yet.
2009-07-14 16:04:19 +02:00
Benjamin Otte
0fd944d4bf Use new pixman extended blend operators
It also adds extended-blend tests.

Based on a previous patch by Emmanuel Pacaud <emmanuel.pacaud@free.fr>
2009-07-14 16:03:43 +02:00
Adrian Johnson
0d44416b9d PDF: Don't round pattern y location to an integer
Using cairo_surface_get_extents() to get page height does not work
when the page height is not an integer.

http://lists.cairographics.org/archives/cairo/2009-July/017570.html
2009-07-12 19:21:28 +09:30
M Joonas Pihlaja
9686331cb0 [spans] Round rasterization grid pixel areas instead of truncating.
When converting a grid pixel area into the range [0,255] the
GRID_AREA_TO_ALPHA() macro would truncate extra bits off the result
rather than rounding. This could cause seams between abutting
collinear edges of separately rendered polygons even when the
coordinates of the abutting edges were the same.

Reported by Soeren Sandmann on the cairo mailing list:

http://lists.cairographics.org/archives/cairo/2009-May/017043.html
2009-07-10 19:06:48 +03:00
Chris Wilson
fbd88db938 [path] Don't include current-point in hash
As we don't strictly use the current-point in comparing paths, exclude it
from the hash. Similarly use the path content flags as a cheap means to
differentiate contents.
2009-07-05 15:01:08 +01:00
Chris Wilson
73f8019fd2 [path] Use cairo_list_t instead of open-coding its own
Use the cairo_list_t and its style of iterators to improve the readability
of the cairo_path_buf_t management. Note the complications that arise from
the embedding of the initial buf -- however the macros do help make the
unusual manipulations more identifiable.
2009-07-05 15:01:03 +01:00
Chris Wilson
a04e372664 [path] Add path watch debugging
Simple debug macro to print the path to stderr during construction.
2009-07-05 10:34:33 +01:00
Chris Wilson
1645352bfb [path] Evaluate is_box && is_region during construction
Whilst constructing the path, if the operations continue to be
axis-aligned lines, allow the is_box and is_region flags to persist. These
are set to false as soon as a curve-to is added, a diagonal or in the case
of is_region a non-integer point.
2009-07-05 09:30:02 +01:00
Chris Wilson
ee8c50f2d6 Remove the defunct test-meta surface
Replace the internal test-meta surface will the freshly exported,
real meta-surface.
2009-07-04 22:00:09 +01:00
Chris Wilson
8a10ab1c04 [script] Tidy dict construction for glyphs
Replace dict with '<< ... >>' similar to surface definitions as it is
easier to read in scripts.
2009-07-04 18:46:21 +01:00
Chris Wilson
fef3649953 [script] Fix the trivial errors running the test suite
A few typos crept in breaking the script output and various refreshes of
the expected results.
2009-07-04 18:32:57 +01:00
Chris Wilson
07c0c8c5c0 [surface] Refactor meta-surface clone
Whilst still obnoxious, at least moving it to a separate function is more
readable.
2009-07-04 14:07:16 +01:00
Chris Wilson
7903c80ee8 [meta] Cache replays when used as a pattern source
Use the cow-snapshotting mechanism to store the meta surface replay (either
to an image inside acquire_source_image() or to a similar surface during
clone_similar()).

Fixes Bug 17971 -- Extreme slowdown for manual convolutions in most
vector backends.
https://bugs.freedesktop.org/show_bug.cgi?id=17971
2009-07-04 13:50:15 +01:00
Chris Wilson
f353ba46a3 [meta] Copy extents on snapshotting.
Need to copy across the extents as well when snapshotting.
2009-07-04 13:49:35 +01:00
Chris Wilson
97bd2228a6 [script] Insert spaces around '<<' and '>>'
The dictionary constructors are just ordinary tokens so need space for
delimiters.
2009-07-03 19:41:51 +01:00
Chris Wilson
6003ab77e1 Export meta-surface
The meta-surface is a vital tool to record a trace of drawing commands
in-memory. As such it is used throughout cairo.

The value of such a surface is immediately obvious and should be
applicable for many applications. The first such case is by
cairo-test-trace which wants to record the entire graph of drawing commands
that affect a surface in the event of a failure.
2009-07-03 18:26:50 +01:00
Chris Wilson
2a9903dbbf [script] Trim some excess verbage
Remove some redundant defining of surfaces and contexts and of setting
defaults. In order to reduce the number of defines, we need to operate on
the operand stack more frequently - though in practice those operations
are quite rare.
2009-07-03 16:47:42 +01:00
Chris Wilson
28773fe79f [test-meta] Initialize image
Oops, stupid mistake - missed off the initialization of the image to NULL
from the last commit.
2009-07-03 13:19:02 +01:00
Chris Wilson
ac6c3dbbae [test-meta] Lazily allocate image
Only allocate the image on first use, as we may never actually need to
construct the image output.
2009-07-03 12:57:53 +01:00
Chris Wilson
fe73a9dd14 [test] Record trace to an in-memory meta-surface
Requires hooking into test-meta-surface currently. Export meta-surface!

The idea is that on detection of an error, we can reconstruct a minimal
trace from the meta-surface. The first step is to simply dump the trace
for the failing meta-surface. Later, we should automatically minimise
this further.
2009-07-03 12:34:10 +01:00
Chris Wilson
633efe8187 [surface] Allocate temporary region on stack
Avoid a very short-lived temporary heap allocation of a region.
2009-07-02 15:29:22 +01:00
Chris Wilson
700a555d19 [surface] Expose a SURFACE_TYPE_MISMATCH nil object
Gah, yet more error object bloat. Must finish cairo-object.
2009-07-01 19:45:11 +01:00