summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)AuthorFilesLines
2013-03-23gobject: Add wrapper around cairo_matrix_tNicola Fontana2-1/+7
Reviewed-By: Benjamin Otte <otte@redhat.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-14script: Set decompression length prior to calling decompressorsChris Wilson1-1/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59224 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08script: Simply exchange source/dest images for _set_source_imageChris Wilson1-5/+14
But note we can only do the exchange if they do indeed match and there are no other references (the objects are only on the stack). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-08script: Attempt to decompress images in placeChris Wilson2-166/+232
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-05script: Recompress strings using LZO whilst binding tracesChris Wilson6-56/+215
Try using the lighter-weight LZO decompressor in an effort to speed up replays (at the cost of making the bound traces slightly larger). Presuming that with the slight increase in file size (from -1% to +10%), the file data remains in the readahead buffer cache, replays see a performance improvement of between 5-10%. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-04gobject: Fix my typo s/TEST/TEXT/ in the previous commitChris Wilson1-1/+1
Again reported by Kouhei Sutou, who I am grateful for his deligence.
2013-01-04gobject: Fix "text_cluster_flags_get_type" typoKouhei Sutou1-1/+1
The macro missed the text from the name, rendering it useless.
2013-01-03gobject: Add the correct macro name for the hint-metrics typeKouhei Sutou1-0/+2
s/CAIRO_GOBJECT_TYPE_HNT_METRICS/CAIRO_GOBJECT_TYPE_HINT_METRICS/ However, as we have already released the broken headers, we need to preserve that mistake in case applications are already using. Since it is just a #define, there is little associated cost with carrying both the incorrect spelling and the corrected define.
2012-11-28script: Fix map-to-image/unmap stack manipulationsChris Wilson1-3/+3
The idiom (and expectation) for surface operators is that it leaves the surface on the stack for the next operation. Also we need to hold onto a surface reference for objects put onto the stack, yet for the map-to-image return we did not own one. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-28trace: Do not forcibly add surfaces to the dictionaryChris Wilson1-18/+32
Adjust the stack manipulation to avoid moving an unknown surface to the dictionary. Reported-by: Dongyeon Kim <dy5.kim@samsung.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-27trace: Fix operand emission for map-to-image and unmap-imageChris Wilson1-24/+34
Reported-by: Dongyeon Kim <dy5.kim@samsung.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-01util/show-polygon: Show the limited range of each edgeChris Wilson1-4/+48
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-08cairo-sphinx: protect -ldl link with CAIRO_HAS_DL like in cairo-trace.Alexis Ballier1-0/+2
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-08cairo-fdr: protect -ldl link with CAIRO_HAS_DL like in cairo-trace.Alexis Ballier1-0/+2
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-09-22Fix malloc-stats for newer glibcBehdad Esfahbod1-1/+1
2012-09-17[util/malloc-stats] Use tighter spacing.Behdad Esfahbod1-3/+3
2012-08-20cairo-script: Attempt to fallback for unresolved patternsChris Wilson1-2/+17
If we fail to resolve a particular pattern, try removing a few features from the pattern and see if we can resolve that fallback and continue on with the trace with a close approximation. This is then behaves very similar as if the pattern requested a specific font that was not available on the system and so was substituted. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-11trace: Fix propagation of CAIRO_TRACE_OUTDIR to childrenChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-10Protect code using dlfcn.h with CAIRO_HAS_DLSYMMaarten Bosmans1-0/+4
2012-03-29win32: Avoid redefining ssize_tKalev Lember1-0/+2
... if it's already defined by system headers. mingw-w64 includes a ssize_t definition, so we'll have to make sure not to redefine it in that case.
2012-03-19trace: Wrap GL surfacesDongyeon Kim1-0/+183
2012-03-15trace: Add breadcrumb for cairo_image_surface_get_data()Chris Wilson1-0/+22
Just emit a marker for when cairo_image_surface_get_data() is called on a surface so that we have a breadcrumb for when the pixels are first exported. (Though note that pointer may be kept around and used much later.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10doc: fix a few typos found by codespellNis Martensen1-1/+1
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-25trace: Remove the warning about the unstable formatChris Wilson1-1/+0
We're stuck with the PostScript style for this generation now. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25script: Prefer polymorphorism for mesh path constructionChris Wilson1-111/+47
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25Convert cairo_mime_surface_t to cairo_raster_source_pattern_tChris Wilson1-15/+12
As discussed, overloading the cairo_surface_t semantics to include sources (i.e. read-only surfaces) was duplicating the definition of cairo_pattern_t. So rather than introduce a new surface type with pattern semantics, start along the thorny road of extensible pattern types. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-12boilerplate: Remove unused thread id parameterAndrea Canciani1-1/+1
The thread id is not used anymore (it is always == 0), so it can be removed.
2011-11-09cairo-script: Don't ask for inlining of a cold-path functionAndrea Canciani1-1/+1
Silences a lot of warnings: inlining failed in call to 'scan_read.part.9': call is unlikely and code size would grow
2011-09-30fill: Fix unantialiased rectilinear-fill-to-boxesChris Wilson1-5/+15
We were calling the antialias close function from the unantialiased paths - a function that operates on a completely different structure to the one passed in. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-27trace: Emit an stack operation to create a pattern from an undefined surfaceChris Wilson1-3/+14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18Make cairo-missing a static libraryAndrea Canciani1-1/+1
It was meant to be static, but my autotools-fu was not good enough.
2011-09-16fdr,tee: Reorder master/slave invocation to capture death-upon-signalsChris Wilson1-0/+26
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12Introduce a new compositor architectureChris Wilson4-36/+122
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-04cairo-missing: Fix buildAndrea Canciani3-8/+12
The cairo-missing code contains multiple typos and uses _cairo_*alloc*() functions without including cairo-malloc-private.h
2011-09-04cairo-missing: Fix and cleanup ssize_t type definitionAndrea Canciani1-0/+8
The definition of ssize_t is needed in cairo-missing.h and can be dropped from files which include it.
2011-09-02Introduce the cairo-missing libraryAndrea Canciani7-1/+221
The cairo-missing library provides the functions which are needed in order to correctly compile cairo (or its utilities) and which were not found during configuration. Fixes the build on MacOS X Lion, which failed because of collisons between the cairo internal getline and strndup and those in libc: cairo-analyse-trace.c:282: error: static declaration of ‘getline’ follows non-static declaration /usr/include/stdio.h:449: error: previous declaration of ‘getline’ was here cairo-analyse-trace.c:307: error: static declaration of ‘strndup’ follows non-static declaration ...
2011-08-30api: Extend cairo_antialias_t to include performace/quality hintsChris Wilson3-0/+14
The existing API only described the method to be used for performing rasterisation and unlike other API provided no opportunity for the user to give a hint as to how to trade off performance against speed. So in order to no be overly prescriptive, we extend the NONE/GRAY/SUBPIXEL methods with FAST/GOOD/BEST hints and leave the backend to decide how best to achieve those goals. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-15stroke: Convert the outlines into contour and then into a polygonChris Wilson4-1/+679
In step 1 of speeding up stroking, we introduce contours as a means for tracking the connected edges around the stroke. By keeping track of these chains, we can analyse the edges as we proceed and eliminate redundant vertices speeding up rasterisation. Coincidentally fixes line-width-tolerance (looks like a combination of using spline tangent vectors and tolerance). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-15Introduce cairo_mime_surface_tChris Wilson1-0/+49
The mime surface is a user-callback surface designed for interfacing cairo with an opaque data source. For instance, in a web browser, the incoming page may be laid out and rendered to a recording surface before all the image data has finished being downloaded. In this circumstance we need to pass a place holder to cairo and to supply the image data later upon demand. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14script: Missed break for creating unbounded recording surfaces.Chris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14script: leave the tail of the RGB24 data unmolestedChris Wilson1-7/+8
We clear past the end of the row so that we don't trigger valgrind warning leaving harmless uninitialised bits inside the input image. However, for RGB24 the input rowlen is 3*width, whereas we write 4*width of data, so we need to take account of that and ensure we clear beyond the end of the written data, not the read data. Fixes reading of RGB24 input. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12util/show-traps: Cache the rendering of the traps+edgesChris Wilson1-14/+86
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12util/show-polygon: Show end-pointsChris Wilson1-6/+17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10script: Include an operator to replay a recording surface to a fileChris Wilson1-0/+42
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10trace: Pop the surface after write-to-pngChris Wilson1-2/+2
It is convenient if the user can simply enable the use of the commented write-to-png operation just by removing the preceding '%'. However, to do so we need to make sure that the line is stack-neutral and so need to pop the surface that we place onto the stack after writing the png. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-07util: Add show-polygonsChris Wilson2-1/+566
Another variant of the utility apps that understand the output of _cairo_debug_print_polygon(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-31Remove useless checks for NULL before freeingAndrea Canciani2-6/+3
This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - }
2011-07-29trace: Emit the content type for image surfacesChris Wilson1-1/+22
Currently we only emit the format, but if you want to later convert the images to a normal surface for replay it is handy to have the content. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-29script: Initialize recording extentsAndrea Canciani1-0/+1
The 2-arguments recording operator was passing a garbage pointer to the surface creation function. Spotted by the clang static analyzer.
2011-07-26API: map-to-image and create-similar-imageChris Wilson2-0/+188
A common requirement is the fast upload of pixel data. In order to allocate the most appropriate image buffer, we need knowledge of the destination. The most obvious example is that we could use a shared-memory region for the image to avoid the transfer cost of uploading the pixels to the X server. Similarly, gl, win32, quartz... The other side of the equation is that for manual modification of a remote surface, it would be more efficient if we can create a similar image to reduce the transfer costs. This strategy is already followed for the destination fallbacks and this merely exposes the same capability for the application fallbacks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>