summaryrefslogtreecommitdiff
path: root/util/cairo-script
Commit message (Collapse)AuthorAgeFilesLines
* Drop cairo-glEmmanuele Bassi2023-01-271-61/+0
| | | | | | | | | The GL support in Cairo has always been a prototype, and nothing happened in the past 10+ years to make it work as it was meant to. GL support is not enabled by any downstream packagers of Cairo, so nobody should notice its absence.
* Add remaining image formats to cairo-script constants tableManuel Stoeckl2023-01-111-0/+3
| | | | | This makes it possible to read cairo-script files which embed RGB30/RGB96F/RGBA128F images.
* Remove autotools buildAdrian Johnson2023-01-084-70/+0
|
* meson: Only link cairo-script-interpreter with liblzoSimon McVittie2022-07-181-1/+1
| | | | | | | The rest of cairo (and therefore most external packages that depend on cairo) doesn't make any use of liblzo. Signed-off-by: Simon McVittie <smcv@debian.org>
* util: Don't expose _csi_stack_push in public ABISimon McVittie2022-07-141-1/+1
| | | | | | | | | This wasn't previously marked as private because it was initially static inline, and only became extern later. Fixes: 9ffbf63d "fix warning: inlining failed in call to '_csi_stack_push'" Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/580 Signed-off-by: Simon McVittie <smcv@debian.org>
* Update util/cairo-script/cairo-script-interpreter.pc.inPierre Labastie2022-05-141-0/+1
|
* Fix some MinGW warningsAdrian Johnson2021-09-021-0/+2
| | | | | | | | | | | | | | | | | The FT change is because my MinGW build is using a more recent version of FT. Remove the disabled _cairo_win32_scaled_font_text_to_glyphs() code to fix the defined but not used warning. _cairo_win32_scaled_font_text_to_glyphs() was diabled in d9408041aa with the comment: "Currently disable the win32-font text_to_glyphs(), until that one is updated. Or better yet, remove it and implement ucs4_to_index(). It's the toy font API afterall." _cairo_win32_scaled_font_ucs4_to_index() was added in d1c619bc7d.
* Added hairline support to cairoRick Yorgason2021-08-151-0/+22
|
* Use uintptr_t for all casts between pointer and integerAdrian Johnson2021-07-251-1/+1
| | | | | | | | | | | | On 64-bit windows, long is 32-bit. When compiling there are a large number of warnings about mismatched sizes when casting long to/from a pointer. Use the (u)intptr_t type for any integer that will have a pointer stored in it. Use a (u)intptr_t cast when integers are stored in pointers to silence warnings. Fixes #263
* meson: Use more dependency objectsUli Schlachter2021-05-221-15/+9
| | | | | | | | For example, to depend on cairo-script, inccairoscript was added to "include_directories:" and libcairoscript was added to "link_with:". This commit instead uses the libcairoscript_dep dependency everywhere. Signed-off-by: Uli Schlachter <psychon@znc.in>
* Drop the conditional inclusion of config.hEmmanuele Bassi2021-05-011-2/+0
| | | | | | | | | | | | We *always* generate this file, and we depend on its existence. The idea behind HAVE_CONFIG_H was being able to include random files from different projects, back in a time where "libraries" were literally just random files instead of actual shared objects. Since we're not in the '80s any more, and our build system(s) define HAVE_CONFIG_H *and* generate the config.h header file, we don't need a conditional guard around its inclusion.
* meson: Define HAVE_CONFIG_H as a project flagEmmanuele Bassi2021-05-011-4/+0
| | | | | | | | Precisely what Autotools does, instead of adding it as per-target C argument. Once we remove HAVE_CONFIG_H checks in every source file, we'll be able to drop it.
* meson: Generate cairo-script-interpreter.pc needed by GTK+Xavier Claessens2020-12-224-1/+31
|
* meson: fix library versioningTim-Philipp Müller2020-12-151-2/+2
| | | | Fixes #442
* build: Fix various compiler warningsGeorge Matsumura2020-11-073-0/+3
| | | | | | This fixes a few compiler warnings that were encountered with gcc 9.3.0. Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
* meson: fix cairo-script-interpreter library nameTim-Philipp Müller2020-08-071-1/+2
| | | | Fixes #418
* Add meson build definitionsMathieu Duponchelle2020-07-311-0/+65
| | | | | | | Co-Authored by: Nirbheek Chauhan <nirbheek@centricular.com> lb90 <luca.bacci982@gmail.com> Tim-Philipp Müller <tim@centricular.com>
* Misc. typosluz.paz2019-01-311-1/+1
| | | | | | | 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-071-0/+12
| | | | | | | | | | | | | | 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>
* 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>
* 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>
* Add CAIRO_STATUS_WIN32_GDI_ERROR for GDI errorsAdrian Johnson2016-03-261-1/+1
|
* Add CAIRO_STATUS_FREETYPE_ERROR for errors returned by libfreetypeAdrian Johnson2016-03-261-0/+2
|
* Adding missing error status to utilsAdrian Johnson2016-03-261-0/+8
|
* 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
|
* [cairo-trace] Work around fontconfig :charset= parse format changeBehdad Esfahbod2014-07-141-0/+12
| | | | As dicussed on the mailing list.
* 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>
* 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>
* script: Add support for replaying device-scaleChris Wilson2013-09-051-0/+48
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* 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>
* script: Fix map-to-image/unmap stack manipulationsChris Wilson2012-11-281-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>
* cairo-script: Attempt to fallback for unresolved patternsChris Wilson2012-08-201-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>
* script: Prefer polymorphorism for mesh path constructionChris Wilson2011-11-251-111/+47
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* cairo-script: Don't ask for inlining of a cold-path functionAndrea Canciani2011-11-091-1/+1
| | | | | | | Silences a lot of warnings: inlining failed in call to 'scan_read.part.9': call is unlikely and code size would grow
* fill: Fix unantialiased rectilinear-fill-to-boxesChris Wilson2011-09-301-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>
* Introduce a new compositor architectureChris Wilson2011-09-122-6/+7
| | | | | | | | | | | | | | | | | | 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. :)
* api: Extend cairo_antialias_t to include performace/quality hintsChris Wilson2011-08-301-0/+3
| | | | | | | | | | | 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>
* script: Missed break for creating unbounded recording surfaces.Chris Wilson2011-08-141-0/+1
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* script: leave the tail of the RGB24 data unmolestedChris Wilson2011-08-141-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>