summaryrefslogtreecommitdiff
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Include correct poll.hGeorge Matsumura2020-09-051-1/+8
| | | | | | | | | Including sys/poll.h when poll.h is available produces a compile warning on some systems, but only sys/poll.h is present on others such as AIX. This makes sure the most suitable poll.h is included in each situation. Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
* meson: Fix musl buildGeorge Matsumura2020-09-022-3/+2
| | | | | | | This constitutes few fixes that are necessary to compile correctly and reduce errors when using musl libc. Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
* meson: Fix undefined reference when bfd library is installedTing-Wei Lan2020-08-311-0/+4
| | | | Add the missing file which is necessary when symbol lookup is enabled.
* meson: fix cairo-script-interpreter library nameTim-Philipp Müller2020-08-071-1/+2
| | | | Fixes #418
* Add meson build definitionsMathieu Duponchelle2020-07-317-0/+234
| | | | | | | Co-Authored by: Nirbheek Chauhan <nirbheek@centricular.com> lb90 <luca.bacci982@gmail.com> Tim-Philipp Müller <tim@centricular.com>
* Misc. typosluz.paz2019-01-312-2/+2
| | | | | | | Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint` Follow up of 12cb59be7da Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
* Add support for RGBA128F and RGB96F formats.Maarten Lankhorst2019-01-072-1/+23
| | | | | | | | | | | | | | IGT wants to add support for planes with a bit depth >10, which requires a higher precision format than we have currently. I'm using RGBA as format, because of its existence in OpenGL. With the new formats we can directly convert our bytes to half float, or multiply a colro vector with a matrix to go to the Y'CbCr colorspace. This requires pixman 0.36.0, so bump the version requirement. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
* cairo-trace: Simplify bigendian case in emit_image.Maarten Lankhorst2019-01-071-20/+5
| | | | | | | | | | All the cases are the same, except len is different. Use the already calculated len parameter to handle all cases except RGB24 the same. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Suggested-by: Bryce Harrington <bryce@bryceharrington.org> Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
* Use HTTPS URLs for gnome.org domainsPaul Menzel2018-10-161-1/+1
| | | | | | | | Run the command below suggested by geirha in ##sed@irc.freenode.net. git grep -l 'http://.*gnome.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}gnome\.org\)|https\1|g' Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
* Use HTTPS URLs for freedesktop.org domainsPaul Menzel2018-10-161-1/+1
| | | | | | | | Run the command below suggested by geirha in ##sed@irc.freenode.net. git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g' Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
* script-surface: Check for invalid ids (CID #1159557, 1159558)Bryce Harrington2018-06-131-0/+2
| | | | | | | | | | | | | If the bitmap's min is non-zero, _bitmap_next_id() could break out of its loop early, before initializing the prev variable. prev would then be dereferenced without a null ptr check. This condition should never occur in practice, so add an assert() to assure it doesn't. Same issue is present in trace.c. Coverity IDs: #1159557, #1159558 Reviewed-By: Uli Schlachter <psychon@znc.in> Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
* Cairo trivial typosUnknown2018-04-021-1/+1
| | | | | | | | | | | | | Found using `codespell -q 3 -I cairo-whitelist.txt` whereby whitelist contained: ``` amin iff lod writen ``` Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* csi-trace does not show helpsuzuki toshiya2018-04-021-2/+2
| | | | | | | | csi-trace does not show help string correctly, due to a bug in its command line argument parsing. strcmp returns 0 when there is an exact match, which means it requires an inverted test. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* util/font-view: fix build errorAdrian Johnson2017-10-211-0/+2
|
* fix warning: inlining failed in call to '_csi_stack_push'Adrian Johnson2017-10-212-9/+13
|
* script: Fix misleading indentation warning.Guillermo Rodriguez2017-08-211-2/+2
| | | | | | Spotted by David Kastrup <dak@gnu.org>. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* fix compiler warningsAdrian Johnson2016-10-041-0/+1
|
* Bug 29319 - Modules are built as versioned shared objectsBehdad Esfahbod2016-09-023-3/+3
| | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29319
* Add CAIRO_STATUS_WIN32_GDI_ERROR for GDI errorsAdrian Johnson2016-03-263-1/+3
|
* Add CAIRO_STATUS_FREETYPE_ERROR for errors returned by libfreetypeAdrian Johnson2016-03-263-0/+4
|
* Adding missing error status to utilsAdrian Johnson2016-03-263-1/+13
|
* cairo-script: Rename struct member to avoid name collision on AIXBryce Harrington2015-06-182-38/+38
| | | | | | | | | | | | | | | | | On AIX, the token jmpbuf is a pre-processor macro. cairo-script-scanner.c includes a private struct with a member named jmpbuf which gets renamed to __jmpbuf when AIX's sys/context.h has been included. While judicious ordering of includes might kludge around this problem (by causing all references to .jmpbuf to become .__jmpbuf), it's better to simply select a new name for the struct member that won't suffer the collision. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89339 Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* cairo-script: Prefer cairo from local treeBryce Harrington2015-06-185-10/+9
| | | | | | | | Use quoted includes rather than bracketed, to prefer linking to the in-tree cairo in preference to the system cairo. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* cairo-script: Cleanup boilerplate header for consistencyBryce Harrington2015-06-181-2/+1
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* cairo-script: Add missing copyright and boilerplateBryce Harrington2015-06-184-0/+132
| | | | | | | | Chris wrote all of the cairo script stuff. I'm making a guess about the copyright date. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* cairo-script: Always include config.h first thingBryce Harrington2015-06-1811-0/+26
| | | | | Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* cairo-script: Improve buffer length checkBryce Harrington2015-06-041-1/+2
| | | | | | | | | | Quells the following warning: cairo-script-scanner.c: In function ‘_translate_string’: cairo-script-scanner.c:1623:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (buf_len <= 8 + 2*string->len) { ^
* csi-trace: Add --version and --help args to utilityBryce Harrington2015-03-061-1/+9
|
* skip MAP_NORESERVE when unsupportedMichael Haubenwallner2015-03-051-0/+4
| | | | | | | Fixes a compilation on AIX ('MAP_NORESERVE' undeclared) Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89340 Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* cairo-trace: Fix duplicated surface push on similar-imageEmanuele Aina2015-01-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | The current code results in trace lines with the source surface being pushed on the stack two times instead of one: s1 s1 //ARGB32 48 48 similar-image % s2 Instead of: s1 //ARGB32 48 48 similar-image % s2 This greatly confuses later commands when the script was replayed, causing traces for trivial GTK3 programs to be unplayable, usually yielding the following error: "invalid value (typically too big) for the size of the input (surface, pattern, etc.)" Drop the duplicated entry from the trace line printed by the cairo_surface_create_similar_image() override. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73580 Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
* sphinx: Add ickle's explanation of what sphinx doesBryce Harrington2014-09-241-0/+8
|
* [cairo-trace] Work around fontconfig :charset= parse format changeBehdad Esfahbod2014-07-141-0/+12
| | | | As dicussed on the mailing list.
* [trace] Don't print FC_CHARSET, FC_LANG, and FC_CAPABILITYBehdad Esfahbod2014-07-111-4/+17
| | | | | | There are many more that can go, but these take the most bytes. FC_CHARSET needs to go specially because I recently changed its format in fontconfig. Ouch!
* Remove some useless declarations found by scan-build, the LLVM/clang static ↵Sylvestre Ledru2014-05-061-1/+0
| | | | | | analyzer Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* test and util: maintain consistency in the usage of ARRAY_LENGTH macroRavi Nanjundappa2014-04-302-7/+9
| | | | | | | | | | ARRAY_LENGTH macro is used in perf's cairo-perf.h, src's cairoint.h, test's cairo-test.h and in some internal header files of util's directory.So to maintain consistency ARRAY_SIZE is replaced with ARRAY_LENGTH macro. Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com> Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* cairo-script: Compare status with CSI enumsBryce Harrington2014-01-311-1/+1
| | | | | | | | | | | | CSI_STATUS_SUCCESS is defined as equivalent to CAIRO_STATUS_SUCCESS. We should prefer the former when comparing against csi_status_t variables, else we'll get a warning: cairo-script-interpreter.c:637:23: warning: comparison between ‘csi_status_t’ and ‘enum _cairo_status’ [-Wenum-compare] Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* cairo-script: Error if asked to decompress with missing compression libBryce Harrington2014-01-312-12/+12
| | | | | | | | | | | | | | | | This quells the following warning: warning: enumeration value ‘LZO’ not handled in switch [-Wswitch-enum] The LZO enum value is defined and used elsewhere, even if lzo support isn't available. This situation might arise if cairo scripts were generated on one system with lzo, and then replayed on a system without it. For now simply error out if this occurs. Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* cairo-trace: Stringify CAIRO_STATUS_JBIG2_GLOBAL_MISSINGBryce Harrington2014-01-311-0/+1
| | | | | | | | | | | This error enum was added last September when JBIG2 support was added. Support it as well in the tracing code. This fixes this warning: trace.c:1544:5: warning: enumeration value ‘CAIRO_STATUS_JBIG2_GLOBAL_MISSING’ not handled in switch [-Wswitch] Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* Fix SSIZE_T definition problem when making with MSYS on Windows7Bryce Harrington2013-10-311-1/+1
| | | | | | | Patch provided by Martin Schlemmer <Martin.Schlemmer@nwu.ac.za> on the mailing list. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* trace: Fix operand emissionChris Wilson2013-09-271-50/+182
| | | | | | | | | | Recent updates (in the past couple of years) to firefox have exposed numerous bugs in the way we emit the operands. A few off-by-ones, missing surfaces and outright bugs all of which are intermixed into producing a corrupt stack. Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* script: Add support for replaying device-scaleChris Wilson2013-09-051-0/+48
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* trace: Record set-device-scaleChris Wilson2013-09-051-0/+12
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* trace: Improve operand emissionChris Wilson2013-06-051-60/+87
| | | | | | | In particular fixing up a couple of corner cases in emitting the right instructions for scaled-fonts and patterns. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* gobject: Add wrapper around cairo_matrix_tNicola Fontana2013-03-232-1/+7
| | | | | Reviewed-By: Benjamin Otte <otte@redhat.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
* script: Set decompression length prior to calling decompressorsChris Wilson2013-01-141-1/+1
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59224 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* script: Simply exchange source/dest images for _set_source_imageChris Wilson2013-01-081-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>
* script: Attempt to decompress images in placeChris Wilson2013-01-082-166/+232
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* script: Recompress strings using LZO whilst binding tracesChris Wilson2013-01-056-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>
* gobject: Fix my typo s/TEST/TEXT/ in the previous commitChris Wilson2013-01-041-1/+1
| | | | Again reported by Kouhei Sutou, who I am grateful for his deligence.
* gobject: Fix "text_cluster_flags_get_type" typoKouhei Sutou2013-01-041-1/+1
| | | | The macro missed the text from the name, rendering it useless.