cairo/src
Dmitri Vorobiev 4a0bd91ff7 scaled-font: fine-tune caching
This patch implements the ideas outlined by Behdad Esfahbod in the following
mailing list message:

http://lists.cairographics.org/archives/cairo/2010-June/020065.html

Specifically, two things have been adjusted. First, the size of the look-up
table was reduced to 64. Second, cache codepath is now bypassed for strings
that are shorter than 16, not only for one-character strings. This allowed
us to reduce the LUT initialization overhead while still retaining the
advantage of caching for common-case string sizes.

We have experimented with different LUT sizes, and it came out that the size
of 64 is the best one in view of speed, at least for our language-neutral
benchmark, which generated random strings of printable ASCII characters.

Below is a table presenting benchmark results for different values of LUT
size:

===============================================================================
 Benchmark		| [1]	| [2]	| [3]	| [4]	| [5]	| [6]	| [7]
===============================================================================
8px text, 1 chars	| 0.41	| 0.41	| 0	| 0.41	| 0	| 0.41	| 0
8px text, 10 chars	| 2.13	| 2.21	| 3.76	| 2.19	| 2.82	| 2.09	| -1.88
8px text, 20 chars	| 2.97	| 3.04	| 2.36	| 3.01	| 1.35	| 2.98	| 0.34
12px text, 1 chars	| 0.94	| 0.94	| 0	| 0.95	| 1.06	| 0.94	| 0
12px text, 10 chars	| 4.73	| 4.89	| 3.38	| 4.9	| 3.59	| 4.82	| 1.9
12px text, 20 chars	| 6.32	| 6.42	| 1.58	| 6.46	| 2.22	| 6.32	| 0
16px text, 1 chars	| 1.75	| 1.76	| 0.57	| 1.77	| 1.14	| 1.76	| 0.57
16px text, 10 chars	| 8.13	| 8.45	| 3.94	| 8.43	| 3.69	| 8.44	| 3.81
16px text, 20 chars	| 10.41	| 10.69	| 2.69	| 10.64	| 2.21	| 10.65	| 2.31
24px text, 1 chars	| 3.3	| 3.3	| 0	| 3.32	| 0.61	| 3.3	| 0
24px text, 10 chars	| 14.68	| 14.97	| 1.98	| 14.97	| 1.98	| 14.87	| 1.29
24px text, 20 chars	| 17.93	| 18.01	| 0.45	| 18.06	| 0.73	| 17.81	| -0.67
96px text, 1 chars	| 23.65	| 23.38	| -1.14	| 23.74	| 0.38	| 23.65	| 0
96px text, 5 chars	| 50.52	| 51.34	| 1.62	| 51.48	| 1.9	| 51.41	| 1.76
96px text, 10 chars	| 57.5	| 58.11	| 1.06	| 58.27	| 1.34	| 58.04	| 0.94
===============================================================================

[1]: Git head, Mpix/s
[2]: {GLYPH_LUT_SIZE = 32, CACHING_THRESHOLD = 16}
[3]: Gain of {32, 16} w.r.t. Git head
[4]: {GLYPH_LUT_SIZE = 64, CACHING_THRESHOLD = 16}
[5]: Gain of {64, 16} w.r.t. Git head
[6]: {GLYPH_LUT_SIZE = 128, CACHING_THRESHOLD = 16}
[7]: Gain of {128, 16} w.r.t. Git head

The benchmark itself can be found from this mailing list message:

http://lists.cairographics.org/archives/cairo/2010-June/020064.html
2010-06-14 15:33:51 +01:00
..
drm color: Special case comparing color stops. 2010-05-13 09:52:39 +01:00
glew gl: fix compilation on MacOS X 2010-06-09 17:53:09 +02:00
.gitignore [build] Include all generated win32 build files in the repo 2009-01-09 15:55:24 -05:00
cairo-analysis-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-analysis-surface.c ps: Enable native encoding of subsurface patterns. 2010-04-30 10:16:24 +01:00
cairo-arc-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-arc.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-array.c Fix typo in docs 2010-05-05 12:30:01 +02:00
cairo-atomic-private.h atomic: Add memory barriers if required for intel primitives 2010-05-20 21:57:58 +01:00
cairo-atomic.c atomic: Tweak for compilation x86. 2010-04-29 10:04:54 +01:00
cairo-base64-stream.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-base85-stream.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-bentley-ottmann-rectangular.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-bentley-ottmann-rectilinear.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-bentley-ottmann.c bo: And disable DEBUG_TRAPS again. 2010-06-09 10:40:32 +01:00
cairo-beos-surface.cpp Update FSF address 2010-04-27 11:13:38 +02:00
cairo-beos.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-botor-scan-converter.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-boxes-private.h drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-boxes.c drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-cache-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-cache.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-cff-subset.c cff: Use correct glyph advance when subsetting cff fonts 2010-05-16 20:52:31 +09:30
cairo-clip-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-clip.c gstate: Track whether the combination of ctm * device is identity. 2010-06-10 13:13:12 +01:00
cairo-color.c pattern: remove content field from solid patterns 2010-06-10 16:07:41 +02:00
cairo-combsort-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-compiler-private.h Add an implementation of ffs() for MSVC 2010-05-06 11:43:52 -04:00
cairo-composite-rectangles-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-composite-rectangles.c Revert bd672d080c 2010-05-13 01:57:24 +02:00
cairo-debug.c cairo: Create error objects for cairo_t 2010-06-12 10:41:09 +01:00
cairo-deflate-stream.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-deprecated.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-device-private.h device: Make flush vfunc return a cairo_status_t 2010-06-07 13:37:48 +02:00
cairo-device.c device: flush before setting finished 2010-06-07 13:37:49 +02:00
cairo-directfb-surface.c surface: remove content argument from is_similar 2010-06-10 16:07:41 +02:00
cairo-directfb.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-drm-xr.h drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-drm.h drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-egl-context.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-error-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-features-uninstalled.pc.in Build -uninstalled.pc files 2008-09-11 00:38:30 -04:00
cairo-features.pc.in More fixes for pkgconfig files 2008-09-10 12:41:57 -04:00
cairo-fixed-private.h drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-fixed-type-private.h Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation" 2010-05-06 16:07:43 -04:00
cairo-fixed.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-font-face-twin-data.c [twin] Improve glyph hints 2008-12-25 02:46:27 -05:00
cairo-font-face-twin.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-font-face.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-font-options.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-freed-pool-private.h freed-pool: Don't access beyond the end of the array. 2010-05-20 21:57:58 +01:00
cairo-freed-pool.c freed-pool: Don't access beyond the end of the array. 2010-05-20 21:57:58 +01:00
cairo-freelist-private.h drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-freelist.c drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-ft-font.c ft: Convert an assert into an unlikely error return. 2010-05-03 19:18:49 +01:00
cairo-ft-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-ft.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-gl-composite.c gl: start returning the failure status aftern an invalid GL op. 2010-06-12 16:49:46 +01:00
cairo-gl-device.c gl: start returning the failure status aftern an invalid GL op. 2010-06-12 16:49:46 +01:00
cairo-gl-glyphs.c gl: start returning the failure status aftern an invalid GL op. 2010-06-12 16:49:46 +01:00
cairo-gl-gradient-private.h gl: support single stop gradients 2010-06-10 16:07:42 +02:00
cairo-gl-gradient.c gl: make check insists "cairoint.h" is first. 2010-06-11 12:19:56 +01:00
cairo-gl-private.h gl: start returning the failure status aftern an invalid GL op. 2010-06-12 16:49:46 +01:00
cairo-gl-shaders.c gl: Make _shader_by_type() a getter 2010-06-07 13:37:48 +02:00
cairo-gl-surface.c gl: start returning the failure status aftern an invalid GL op. 2010-06-12 16:49:46 +01:00
cairo-gl.h gl: Added WGL context and surface. 2010-06-14 12:46:26 +01:00
cairo-glx-context.c glx: When acquiring device, use the correct drawable 2010-06-07 13:37:48 +02:00
cairo-gstate-private.h gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
cairo-gstate.c gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
cairo-hash-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-hash.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-hull.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-image-info-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-image-info.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-image-surface.c image: Apply component alpha to composite masks. 2010-06-11 22:04:14 +01:00
cairo-list-private.h drm: code dump, sorry. 2010-05-12 20:54:49 +01:00
cairo-lzw.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-malloc-private.h Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation" 2010-05-06 16:07:43 -04:00
cairo-matrix.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-misc.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-mutex-impl-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-mutex-list-private.h cairo: Create error objects for cairo_t 2010-06-12 10:41:09 +01:00
cairo-mutex-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-mutex-type-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-mutex.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-observer.c gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
cairo-os2-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-os2-surface.c os2: Fix get_extents() segfaulting. 2010-05-03 10:20:51 +02:00
cairo-os2.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-output-stream-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-output-stream.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-paginated-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-paginated-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-paginated-surface.c paginated: Mark as clear initially. 2010-05-04 18:53:50 +01:00
cairo-path-bounds.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-path-fill.c region: _cairo_region_create_in_error() 2010-05-10 12:45:31 +01:00
cairo-path-fixed-private.h path: Exponentially grow buffer based on populated points and ops. 2010-06-11 09:06:20 +01:00
cairo-path-fixed.c path: Exponentially grow buffer based on populated points and ops. 2010-06-11 09:06:20 +01:00
cairo-path-in-fill.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-path-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-path-stroke.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-path.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-pattern.c pattern: Remove incorrect optimisations from _cairo_pattern_aquire_surface() 2010-06-11 21:26:26 +01:00
cairo-pdf-operators-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-pdf-operators.c pdf: Assert that no other error can occur for an invertible matrix. 2010-05-04 18:53:50 +01:00
cairo-pdf-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-pdf-surface.c pdf: support single stop gradients 2010-06-10 16:07:42 +02:00
cairo-pdf.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-pen.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-png.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-polygon.c polygon: Reorder conditionals based on likelihood. 2010-06-11 10:59:17 +01:00
cairo-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-ps-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-ps-surface.c ps: support single stop gradients 2010-06-10 16:07:42 +02:00
cairo-ps.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-qt-surface.cpp Update FSF address 2010-04-27 11:13:38 +02:00
cairo-qt.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-quartz-font.c quartz-font: Silence 0x0 CGContext warning 2010-05-17 22:01:50 +02:00
cairo-quartz-image-surface.c Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation" 2010-05-06 16:07:43 -04:00
cairo-quartz-image.h Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation" 2010-05-06 16:07:43 -04:00
cairo-quartz-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-quartz-surface.c quartz: fix repeating radial gradients on 64 bits 2010-05-17 22:12:36 +02:00
cairo-quartz.h Update license blocks to use "Mozilla Foundation" instead of "Mozilla Corporation" 2010-05-06 16:07:43 -04:00
cairo-recording-surface-private.h recording: Avoid refcycles by always copying the command array. 2010-05-05 09:23:59 +01:00
cairo-recording-surface.c pattern: Remove extraordinary _cairo_pattern_fini_snapshot(). 2010-06-11 21:08:06 +01:00
cairo-rectangle.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-rectangular-scan-converter.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-reference-count-private.h atomic: Remove unused function _cairo_atomic_int_set() 2010-04-29 10:52:47 +02:00
cairo-region-private.h region: _cairo_region_create_in_error() 2010-05-10 12:45:31 +01:00
cairo-region.c region: clarify docs of cairo_region_equal() 2010-06-07 13:37:48 +02:00
cairo-rtree-private.h rtree: Actually pin the node when pinning. 2010-05-16 10:23:30 +01:00
cairo-rtree.c rtree: Remove the unused evict hook. 2010-05-12 20:54:49 +01:00
cairo-scaled-font-private.h scaled-font: Convert to cairo_list_t 2010-05-04 18:53:03 +01:00
cairo-scaled-font-subsets-private.h cff: Use correct glyph advance when subsetting cff fonts 2010-05-16 20:52:31 +09:30
cairo-scaled-font-subsets.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-scaled-font.c scaled-font: fine-tune caching 2010-06-14 15:33:51 +01:00
cairo-script-surface.c pattern: remove content field from solid patterns 2010-06-10 16:07:41 +02:00
cairo-script.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-skia-surface.cpp Update FSF address 2010-04-27 11:13:38 +02:00
cairo-skia.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-slope-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-slope.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-spans-private.h Remove _cairo_surface_composite_trapezoids_as_polygon() 2010-06-07 13:37:49 +02:00
cairo-spans.c Remove _cairo_surface_composite_trapezoids_as_polygon() 2010-06-07 13:37:49 +02:00
cairo-spline.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-stroke-style.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-clipper-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-clipper.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-fallback-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-fallback.c fallback: Remove span renderer paths 2010-05-14 15:56:17 +02:00
cairo-surface-offset-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-offset.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-private.h gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
cairo-surface-snapshot-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-surface-snapshot.c snapshot: Attach the backend generated snapshot to the target 2010-04-30 10:16:23 +01:00
cairo-surface-subsurface-private.h ps: Enable native encoding of subsurface patterns. 2010-04-30 10:16:24 +01:00
cairo-surface-subsurface.c subsurface: Don't double apply device offset for deep subsurfaces. 2010-05-08 18:24:48 +01:00
cairo-surface-wrapper-private.h ps: Enable native encoding of subsurface patterns. 2010-04-30 10:16:24 +01:00
cairo-surface-wrapper.c ps: Enable native encoding of subsurface patterns. 2010-04-30 10:16:24 +01:00
cairo-surface.c gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
cairo-svg-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-svg-surface.c Make cairo_color_stop_t a unique type. 2010-05-13 10:00:18 +01:00
cairo-svg.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-system.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-tee-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-tee-surface.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-tor-scan-converter.c spans: Pass multiple rows of identical spans to the renders. 2010-01-22 23:01:51 +00:00
cairo-toy-font-face.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-traps.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-truetype-subset-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-truetype-subset.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-type1-fallback.c type1: Use correct glyph advance when subsetting type 1 fonts 2010-05-16 20:52:31 +09:30
cairo-type1-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-type1-subset.c type1: Use correct glyph advance when subsetting type 1 fonts 2010-05-16 20:52:31 +09:30
cairo-type3-glyph-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-type3-glyph-surface.c type3: Minor tweaks to remove a redundant check. 2010-05-04 18:53:50 +01:00
cairo-types-private.h gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
cairo-unicode.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-uninstalled.pc.in Build -uninstalled.pc files 2008-09-11 00:38:30 -04:00
cairo-user-font-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-user-font.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-version.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-version.h Some nasty tracks to make changing version number not cause a total rebuild 2008-08-28 18:18:23 -04:00
cairo-vg-surface.c openvg: fix build break 2010-06-02 23:00:01 +02:00
cairo-vg.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-wgl-context.c gl: Added WGL context and surface. 2010-06-14 12:46:26 +01:00
cairo-wideint-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-wideint-type-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-wideint.c Remove excessive semicolons 2010-04-29 20:45:23 +02:00
cairo-win32-font.c Bug 28100 - Font option CAIRO_HINT_METRICS_OFF unhonoured on win32 2010-05-14 14:48:46 -04:00
cairo-win32-printing-surface.c win32: Fixed compile errors in Windows backend. 2010-06-14 12:44:20 +01:00
cairo-win32-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-win32-surface.c win32: Fixed compile errors in Windows backend. 2010-06-14 12:44:20 +01:00
cairo-win32.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xcb-connection-core.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xcb-connection-render.c xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xcb-connection-shm.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xcb-connection.c xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xcb-private.h xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xcb-screen.c xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xcb-shm.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xcb-surface-cairo.c Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xcb-surface-core.c xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xcb-surface-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xcb-surface-render.c xcb: discard glyph mask and use dst directly when possible. 2010-05-12 20:54:48 +01:00
cairo-xcb-surface.c xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xcb.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xlib-display.c xlib: Remove reference counting for cairo_xlib_screen_t 2010-05-06 10:46:49 +01:00
cairo-xlib-private.h xlib: Remove reference counting for cairo_xlib_screen_t 2010-05-06 10:46:49 +01:00
cairo-xlib-screen.c xlib: Remove reference counting for cairo_xlib_screen_t 2010-05-06 10:46:49 +01:00
cairo-xlib-surface-private.h xlib: Adjust trapezoid precision based on antialias. 2010-06-11 11:16:42 +01:00
cairo-xlib-surface.c xlib: Adjust trapezoid precision based on antialias. 2010-06-11 11:16:42 +01:00
cairo-xlib-visual.c xlib: Remove reference counting for cairo_xlib_screen_t 2010-05-06 10:46:49 +01:00
cairo-xlib-xcb-surface.c xcb: trivial memfault fixes. 2010-05-10 13:36:53 +01:00
cairo-xlib-xrender-private.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xlib-xrender.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xlib.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo-xml-surface.c device: Make flush vfunc return a cairo_status_t 2010-06-07 13:37:48 +02:00
cairo-xml.h Update FSF address 2010-04-27 11:13:38 +02:00
cairo.c cairo: Create error objects for cairo_t 2010-06-12 10:41:09 +01:00
cairo.h subsurface: s/region/rectangle/ 2010-04-30 10:16:06 +01:00
cairo.pc.in Improve backend .pc files generation: 2006-07-12 04:27:55 -04:00
cairoint.h cairo: Create error objects for cairo_t 2010-06-12 10:41:09 +01:00
check-def.sh Set LC_ALL=C instead of LANG=C 2009-09-16 15:50:34 -04:00
check-doc-syntax.sh Improve doc syntax check to allow inline macro docs 2010-04-01 01:53:53 -04:00
check-has-hidden-symbols.c [check] Move the hidden symbol check into check-{def,plt}.sh 2008-01-11 21:21:34 +00:00
check-headers.sh Set LC_ALL=C instead of LANG=C 2009-09-16 15:50:34 -04:00
check-link.c [src/check-link.c] Simple test to check we can link to the built cairo.so 2008-09-02 21:31:43 -04:00
check-plt.sh Set LC_ALL=C instead of LANG=C 2009-09-16 15:50:34 -04:00
check-preprocessor-syntax.sh Set LC_ALL=C instead of LANG=C 2009-09-16 15:50:34 -04:00
Makefile.am Add a private copy of GLEW 2009-09-14 09:26:02 +01:00
Makefile.am.analysis [check] Quieten output during checking headers-standalone 2009-05-07 15:14:14 +01:00
Makefile.sources gstate: Update cached matrix state after device transform changes on the target 2010-06-11 16:08:17 +01:00
Makefile.win32 [win32] Include $(OPT) flags when linking cairo.dll 2009-02-26 16:04:49 -05:00
Makefile.win32.features gallium: Refresh. 2010-05-12 20:54:49 +01:00
README Fix various README typos 2009-01-02 02:56:38 -05:00
test-fallback-surface.c Update FSF address 2010-04-27 11:13:38 +02:00
test-fallback-surface.h Update FSF address 2010-04-27 11:13:38 +02:00
test-fallback16-surface.c Update FSF address 2010-04-27 11:13:38 +02:00
test-fallback16-surface.h Update FSF address 2010-04-27 11:13:38 +02:00
test-null-surface.c Update FSF address 2010-04-27 11:13:38 +02:00
test-null-surface.h Update FSF address 2010-04-27 11:13:38 +02:00
test-paginated-surface.c Update FSF address 2010-04-27 11:13:38 +02:00
test-paginated-surface.h Update FSF address 2010-04-27 11:13:38 +02:00
test-wrapping-surface.c Update FSF address 2010-04-27 11:13:38 +02:00
test-wrapping-surface.h Update FSF address 2010-04-27 11:13:38 +02:00

Cairo Library Source Code
=========================

This directory contains the source code of the cairo library.


Source Code Listing
-------------------

The canonical list of source files is the file Makefile.sources.  See that
file for how it works.


New Backends
------------

The rule of the thumb for adding new backends is to see how other
backends are integrated.  Pick one of the simpler, unsupported, backends
and search the entire tree for it, and go from there.

To add new backends you need to basically:

  * Modify $(top_srcdir)/configure.in to add checks for your backend.

  * Modify Makefile.sources to add source files for your backend,

  * Modify $(top_srcdir)/boilerplate/ to add boilerplate code for
    testing your new backend.


New API
-------

After adding new API, run "make check" in this directory and fix any
reported issues.  Also add new API to the right location in
$(top_srcdir)/doc/public/cairo-sections.txt and run "make check"
in $(top_builddir)/doc/public to make sure that any newly added
documentation is correctly hooked up.

Do not forget to add tests for the new API.  See next section.


Tests
-----

There are some tests in this directory that check the source code and
the build for various issues.  The tests are very quick to run, and
particularly should be run after any documentation or API changes.  It
does not hurt to run them after any source modification either.  Run
them simply by calling:

	make check

There are also extensive regression tests in $(top_srcdir)/test.  It is
a good idea to run that test suite for any changes made to the source
code.  Moreover, for any new feature, API, or bug fix, new tests should
be added to the regression test suite to test the new code.


Bibliography
------------

A detailed list of academic publications used in cairo code is available
in the file $(top_srcdir)/BIBLIOGRAPHY.  Feel free to update as you
implement more papers.

For more technical publications (eg. Adobe technical reports) just
point them out in a comment in the header of the file implementing them.