summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2009-09-09[twin] Initialise all propertiesChris Wilson1-0/+2
Left a couple of uninitialised properties along the non-toy font construction path.
2009-09-08[spans] Correct offsets for trapezoidsChris Wilson1-2/+2
Pass on the destination offset from composite_trapezoids() to composite_polygon().
2009-09-08[build] Improve handling of missing test apparatusChris Wilson1-0/+7
Improve detection, reporting and disabling of test backends when we lack the required libraries and utilities.
2009-09-08[gl] Supply extents for acquire source imageChris Wilson1-1/+5
I have no idea how we survived for so long without supplying the source extents...
2009-09-06[xlib] Protect ourselves from liars that claim to have a 64k windowChris Wilson1-2/+25
Found using webkit, who attempt to paint an width X page height window. Please, please clip large windows to the visible area. Thanks.
2009-09-05[configure] Add option to disable trace.Chris Wilson1-0/+7
Some environments may be broken beyond our capabilities to detect, or maybe the user is just insane and doesn't want to build my nice shiny cairo-trace. Whatever, give them the option to choose: $ ./configure --disable-trace
2009-09-04[gl] compile fix.Chris Wilson1-1/+2
Compiled fine during testing -- only I forgot I hadn't enable the gl surface.
2009-09-04[xlib] Enable pad_reflect by defaultChris Wilson1-7/+12
If the XServer claims to support the required Render extension then send it the operations. However for the cases where we know it does not work, i.e. the current and previous generations (<=1.6) of Xorg servers, enable the buggy_pad_reflect fallbacks.
2009-09-04[fallback] Only eliminate the clip if the operation is boundedChris Wilson1-15/+42
For unbounded operations we still need to pass along the clip in order to correctly limit the extents of the operation.
2009-09-03[win32] Remove unused clone_similar()Chris Wilson2-57/+2
The win32 backend handles surface sources directly and never calls _cairo_pattern_acquire_surface() which is the only other possible user of clone_similar().
2009-09-03[mutex] Hook into pthread lastChris Wilson1-23/+24
Check for native mutex types before hooking into pthread, as this workarounds broken builds on mingw that confuse us by including the pthread header file.
2009-09-03[gl] Allocate small number of rectangles on the stackChris Wilson1-14/+29
FillRectangle is most frequently used to fill an entire imagee with the background colour, i.e. with just a single, or few, rectangle. Avoid heap allocation for this common case by allocating enough space for 4 rectangles (vertices+colors) on the stack.
2009-09-03[gl] Assert that the error is impossible.Chris Wilson1-2/+2
As we created the image, it should not need coercing into a suitable format and so we should be able to upload it without failure.
2009-09-03[gl] Remove reference to depth_stencil_texChris Wilson2-3/+0
We no longer use a depth-stencil, so remove the vestigial reference.
2009-09-03[image] Check for out of bounds image surface sizes in constructors.M Joonas Pihlaja1-2/+25
The image surface code doesn't reliably work on images larger than 32767 in width or height. This patch makes the image surface constructors fail by returning a surface in the CAIRO_STATUS_INVALID_SIZE state when given negative or too large dimensions so that client code gets a prompt and correct error rather than flaky rendering on large images.
2009-09-03[xlib] solid pictures should only be 1x1Chris Wilson1-1/+1
Creating an widthxheight solid picture for using with RenderCompositeTrapezoids defeats the optimization with the xserver that checks for a solid alpha pattern. The checks it performs are for CONTENT_ALPHA, Repeat, 1x1 and value == 0xff.
2009-09-03[polygon] Compute the limit of the limits slightly more efficientlyChris Wilson1-12/+12
Initialize the bbox to the first limit, as frequently there will only be a single (or at least a small number) limit.
2009-09-03[boilerplate] Handle errors whilst creating GL surfaceChris Wilson1-8/+8
2009-09-03[polygon] Fix discard with non-banded disjoint clip boxesChris Wilson2-5/+25
The early discard checked if the line was below the last clip-box, or if above the first. However, the clip-boxes are only sorted on by the bottom (not the strict XY-banded sort of the regions) and so this was erroneously discarding lines.
2009-09-02[xlib] Remove stray codeChris Wilson1-11/+2
Grr. Should have spotted this before pushing - remove the addition of the superfluous code.
2009-09-02[xlib] Eliminate GC clippingChris Wilson4-145/+116
Eradicate the use of clipping with GC. By never using clipping, we never have to worry about retrieving a dirty clip from the GC cache.
2009-09-01[xlib] Make xlib_display_t private and rename xlib_screen_info_tChris Wilson5-206/+339
The issue Joonas was trying to solve was the unwanted inclusion of the inlines via cairo-freelist-private.h. Unwittingly he included cairoint.h from cairo-xlib-private.h instead, a far more heinous crime as that causes the boilerplate to try to use the hidden, private symbols. Instead we resolve this issue by making the cairo_xlib_display_t structure private to cairo-xlib-display.c and provide functions to manipulate the abstract data type. Whilst in the vicinity, we rename cairo_xlib_screen_info_t to cairo_xlib_screen_t for consistency and cleanliness.
2009-09-01Revert "[freelist] Make _cairo_freepool_alloc_from_new_pool static inline."Chris Wilson2-27/+31
This reverts commit 5a3fa29b370816acb3a08d60e4031ed82c1e4c73 as it breaks the boilerplate when linking with gcc.
2009-09-01[freelist] Make _cairo_freepool_alloc_from_new_pool static inline.M Joonas Pihlaja2-31/+27
The xlib boilerplate includes a cairo private header to be able to disable usage of the render extension. This indirectly includes cairo-freelist-private.h which contains a bunch of static inline functions which use the private _cairo_freepool_alloc_from_new_pool function, but since that is not inline also, it causes an undefined extern which cannot be resolved. The binutils linker doesn't care since the freelist function aren't actually used in the boilerplate but the Solaris linker does. By making the .._alloc_from_new_pool function inline no dangling references are created and linking succeeds.
2009-09-01[wrapper] Avoid a void return gccism.M Joonas Pihlaja1-1/+1
Returning void using the pattern "return func_returning_void(...)" is a gccism not supported by Sun Studio 12.
2009-09-01[ps] Clip meta-surface to desired extents.Chris Wilson1-3/+43
Ensure that the meta surface does not extend beyond the operation by forcing a clip to the extents of the operation. Fixes test/device-offset and test/device-offset-positive
2009-09-01[ps/pdf] Trim patterns to operation extentsChris Wilson4-35/+319
If we have to rasterise a pattern for use by PS/PDF (for example, to satisfy CAIRO_EXTENT_PAD) then only generate an image large enough to cover the operation extents. We ensure tight coverage by computing the extents afresh - we could do this lazily in the future, but we can not rely on the bounds as computed by the analysis surface as for native operations they may not be tight.
2009-09-01[path] Standalone header-compilationChris Wilson1-2/+2
Hmm, TRUE/FALSE apparently weren't defined before use. Odd.
2009-09-01Compiler warningsChris Wilson2-4/+5
Add an impossible default condition to avoid a compiler warning. And tweak the code to avoid mismatching signed/unsigned comparisons.
2009-09-01[tee] Rename 'append' to 'add' and add symmetric 'remove'Chris Wilson2-7/+52
2009-09-01[pattern] Remove unused hidden symbol for cairo_pattern_status()Chris Wilson2-6/+4
2009-08-31PDF: Ensure operator is selected before painting surfaceAdrian Johnson1-8/+8
2009-08-31PDF: Flush operators before writing to the PDF streamAdrian Johnson1-0/+4
2009-08-31PDF: Reset alpha to 1.0 before painting a surfaceAdrian Johnson1-1/+7
Fixes a test suite regression.
2009-08-31PDF: Avoid using patterns when filling a surface with EXTEND_NONEAdrian Johnson1-0/+19
The fill equivilant of the previous optimization.
2009-08-31PDF: Avoid using patterns when painting surfaces with EXTEND_NONEAdrian Johnson1-0/+58
This is an optimization the PS surface has been using to improve printing speed and prevent printers from choking on large images. Applying this optimzation to PDF prevents the same problem occuring when the PDF is converted to PS.
2009-08-31PDF: Fix bug when when embedding surfacesAdrian Johnson1-1/+2
2009-08-30[bo-rectangular] Fix assertion failure with insertion sortChris Wilson1-0/+4
We remember the location of the last insert as the next edge is likely to be nearby. However, we need to be careful when the pointer rests upon the HEAD and ensure that we begin the search from the appropriate end.
2009-08-29Use the more generic is_box when doing simple extent checksChris Wilson4-5/+5
is_rectangle() is far stricter than is_box(), and is only required for a very limited set of operations (essentially were the rectangle must conform to the motion as described by cairo_rectangle). For the general case where we just want to know whether we have a single rectangular path that covers a certain area, is_box() is sufficient.
2009-08-29[clip] Correctly compute a geometric mask for a rectilinear + arbitraryChris Wilson1-9/+38
Fix up the geometric clipper to handle intersecting a rectilinear path with an arbitrary path and inspecting the result to see if it becomes a a region.
2009-08-29[clip] Apply surface offset when combining with clip maskChris Wilson6-57/+56
In order to correctly combine the clip mask with the compositing mask the clip path must be offset so that it is relative to the destination surface.
2009-08-29[clip] Pass in destination offset for combining with clip-maskChris Wilson3-29/+34
When combining a clip-mask with a subsurface, as when used to combine with the composite mask, we need to pass the destination surface offset to the clip so that the paths can be corrected for the new surface.
2009-08-29Fix build on systems with older Xrender headers.Damian Frank3-34/+93
This patch revises xlib so that it doesn't depend on having recent Xrender headers to build. In particular, some definitions were added to the private xrender header file, and an ifdef render version check CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR was changed to a run-time check using CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS.
2009-08-29[script] Fix use of freed listChris Wilson1-1/+1
A typo, I missed converting the user over to the freshly sorted list, leaving it iterating over original but checking the sorted for termination conditions.
2009-08-29[path] Return the canonical box.Chris Wilson2-36/+24
When returning the single box that represents a path, always return it consistently wound.
2009-08-29[scaled-font] Fix implementation-face refleakChris Wilson1-1/+8
If we found the font via the holdover cache, or if we returned due to an error, we would leak a reference count on the implementaton face.
2009-08-29[ft] Improve error path handling.Chris Wilson1-6/+6
Specifically check for an error during resolving the font and do not cache the error object.
2009-08-29[scaled-font] Refleak on error path.Chris Wilson1-5/+4
Perform the destroy of the local font before returning along the error path.
2009-08-29[clip] Fix refleak of previous clipping surfaces.Chris Wilson1-3/+6
When combining previous clip masks, we leaked a referenced due to not destroying the returned reference.
2009-08-29[path-fixed] Distinguish cw and ccw boxesChris Wilson1-2/+2
To correctly handle retessellating trapezods constructed from alternately wound boxes, then we need to pass that information from the path to the tessellator. We do this by switching the direction of the box if the first edge is horizontal as opposed to vertical.