summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2009-09-18Add a description of how we compute the spline_error_squared.Jeff Muizelaar1-6/+11
2009-09-16Set LC_ALL=C instead of LANG=CBehdad Esfahbod5-5/+10
2009-09-15Use __uint128_t and __int128_t if availableSebastian Dröge3-49/+49
GCC uses a peculiar name for a real 128-bit integer on x86-64. Speedups, xlib on a gm45 ======================== poppler 41246.56 -> 35102.82: 1.18x speedup swfdec-youtube 12623.01 -> 11936.79: 1.06x speedup Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-14[autoconf] Comment on the SIZEOF_VOID__ -> SIZEOF_VOID_P workaround.M Joonas Pihlaja1-0/+2
Explain where the weird SIZEOF_VOID__ comes from.
2009-09-14[build] Work around autoconf void* -> VOID__ name conversion bug.M Joonas Pihlaja1-0/+4
The autoconf shipping with OpenBSD 4.5 converts sizeof(void*) to SIZEOF_VOID__ rather than SIZEOF_VOID_P. Work around that by defining SIZEOF_VOID_P if required.
2009-09-14[build] Add a default message for when GLEW isn't builtChris Wilson1-8/+0
And it appears I touched the build system again and autoregenerated the feature headers.
2009-09-14Add a private copy of GLEWChris Wilson7-0/+25925
This appears to be the simplest mechanism to build libglew at the moment - should a system copy be unavailable. Fortunately libglew is now distributed under a permissive licence. If you want to pass 'make -C src check' you have to use the system copy, or spend quite a bit of time cairo-fying libglew.
2009-09-13[image] Add pixel masks for BGRA formatsChris Wilson1-1/+9
pixman introduced the BGRA pixel type not too long ago, and so we need to update our pixman_format_code_t to cairo_format_masks_t translator.
2009-09-13[configure] --enable-symbol-lookupChris Wilson1-0/+7
There you go Joonas, I don't always ignore your suggestions! This is simple patch to allow the user to disable symbol loops in case the auto-detection fails on some obscure (perhaps OpenBSD) platform. Or in case the user really wants to trim a few bytes from a library only used during tracing!
2009-09-11[xlib] Fix big-line.Chris Wilson3-246/+164
Project lines that exceed the 16.16 limits onto the XFixedLine, as we know that top/bottom must fit within the confines of the surface and so will be less than 16 bits. Sadly this is a run-on patch that also does: 1. Make FillTiled the default for new GCs. 2. Stores extend mode as opposed to repeat, and thereby cleaning up some inconsistent code. 3. Remove the special casing for unbounded trapezoids, as it is redundant with the polygon clipping. 4. Tidy the logic for deciding when to use the core protocol (_categorize_composite_operation)
2009-09-11[xlib] Discard clip if larger than glyph extentsChris Wilson3-0/+65
Implement cheap calculation of glyph extents to see whether we can discard the clip region. This is effective around 50% of the time for firefox (and makes the xtrace so much neater).
2009-09-10[surface] Early return for (region IN white)Chris Wilson1-0/+7
Fill a region using IN and a white source is a frequent reduction of a complex clip (viz a path that covers the whole operation extents will be reduced to a single rectangle), and we can simply discard the fill (as it always has bounded semantics).
2009-09-10[clip] Simplify applying a box clipChris Wilson2-39/+48
If the clip path is a simple box, then for many operations it is entirely representation by the alteration of extents and so we can skip a few steps during reconstruction.
2009-09-10[xlib] Fix extraction of GC during XCloseDisplay()Chris Wilson1-1/+1
Jeff Muizelaar reported a bug from his firefox builds that was causing a double free during XCloseDisplay, and suggested it was related to c0e01d9cd. Reviewing the cleanup, suggested that the cause may just be a pair of missing parenthesis.
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.