cairo/boilerplate
John Ralls 951a3dd9a7 [quartz]Conditionally Use Main Display ColorSpace instead of kCGColorSpaceDefaultRGB.
The default RGB colorspace must be converted to the GPU's colorspace
    using CGColorTransformConvertUsingCMSConverter. Profiling has shown this
    function to consume as much as 48% of a redraw cycle in gdk-quartz.

    There seems to be no named colorspace that matches the one stored on the
    display, so we use the one associated with the main display. This has
    some risks for users with multiple monitors but in testing with my own
    two-monitor setup, one of which is HDR and the other not, the colorspace
    was the same for both.

    This is applied to quartz surfaces created with
    cairo_quartz_surface_create(); surfaces created with
    cairo_quartz_surface_create_for_cg_context will inherit the colorspace
    from the context.

    In order to generate PNGs that look right I've converted the
    existing debugging functions for writing a quartz surface to png
    into private functions and wired cairo-boilerplate-quartz to use
    them. Using the generic cairo routine produced washed-out PNGs.

    Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/330
2023-02-17 10:25:14 -08:00
..
.gitignore gitignore: Ignore .trs (test results) 2015-07-31 17:56:54 -07:00
cairo-boilerplate-getopt.c whitespace: Fixup formal arguments and tabs in boilerplate/ and perf/. 2010-06-24 15:02:53 +03:00
cairo-boilerplate-getopt.h [cairo-boilerplate] Silence compiler warning. 2008-06-13 21:34:43 +01:00
cairo-boilerplate-pdf.c Fix testing in the full mode for PDF, PS and SVG backends 2020-11-13 12:04:51 +00:00
cairo-boilerplate-private.h Refactor ARRAY_LENGTH macro definitions in test code 2014-11-20 12:22:06 -08:00
cairo-boilerplate-ps.c Fix PS test crash 2021-07-18 18:13:10 +09:30
cairo-boilerplate-quartz.c [quartz]Conditionally Use Main Display ColorSpace instead of kCGColorSpaceDefaultRGB. 2023-02-17 10:25:14 -08:00
cairo-boilerplate-scaled-font.h whitespace: Fixup formal arguments and tabs in boilerplate/ and perf/. 2010-06-24 15:02:53 +03:00
cairo-boilerplate-script.c boilerplate: Remove unused thread id parameter 2011-11-12 20:49:08 +01:00
cairo-boilerplate-svg.c Add support for CAIRO_CONTENT_COLOR 2021-05-01 23:14:24 +02:00
cairo-boilerplate-system.c Remove stray _GNU_SOURCE definitions 2021-05-01 16:58:15 +01:00
cairo-boilerplate-system.h whitespace: Fixup formal arguments and tabs in boilerplate/ and perf/. 2010-06-24 15:02:53 +03:00
cairo-boilerplate-test-surfaces.c Retire dummy cairo-version.h header to fix meson subproject build 2020-09-29 15:50:53 +00:00
cairo-boilerplate-win32-printing.c Defining Windows version macros in meson.build 2023-01-13 05:47:03 +09:00
cairo-boilerplate-win32.c win32: gcc 5.4 build fix 2016-06-21 19:44:48 +09:30
cairo-boilerplate-xcb.c boilerplate: Use _cairo_malloc instead of malloc 2021-07-23 18:33:19 +09:30
cairo-boilerplate-xlib.c boilerplate: Use _cairo_malloc instead of malloc 2021-07-23 18:33:19 +09:30
cairo-boilerplate-xlib.h [boilerplate] Add missing headers. Oops! 2007-04-21 07:23:30 -04:00
cairo-boilerplate.c Replace use of ctype functions with internal version where only ASCII chars are used 2022-04-09 22:08:57 +09:30
cairo-boilerplate.h Fix some MinGW warnings 2021-09-02 21:14:51 +09:30
check-link.c Retire dummy cairo-version.h header to fix meson subproject build 2020-09-29 15:50:53 +00:00
make-cairo-boilerplate-constructors.py meson: use encoding=utf-8 when reading/writing files in helper script 2021-02-23 23:42:11 +00:00
make-cairo-boilerplate-constructors.sh Add meson build definitions 2020-07-31 12:21:50 +01:00
meson.build Drop cairo-gl 2023-01-27 19:21:46 +00:00
README Add boilerplate/README explaining its purpose 2006-08-30 22:33:53 -07:00

This directory provides code that is common to both of cairo's tests
suites:

 * The test suite for correctness in test/
 * The test suite for performance in perf/

We call it boilerplate as it consists primarily of the boilerplate
code necessary for initializing a backend in order to create a surface
for that backend.

The code here just might be useful for someone looking to get started
writing cairo code to use a particular backend, (but there are no
promises that the boilerplate code found here for any particular
backend is exemplary).