mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-17 17:20:37 +02:00
[cairoint] Define CAIRO_STACK_BUFFER_SIZE (defaults to 2kb)
This is the suggested size in bytes of buffers allocated on the stack per function, mostly used for glyph rendering. We typically use a local buffer on the stack to avoid mallocing for small requests. Requests that do not fit are malloc()ed automatically. The default value should be enough for about a 100-glyph cairo_show_glyphs() operation.
This commit is contained in:
parent
5a9642c574
commit
da60bc45f2
1 changed files with 7 additions and 0 deletions
|
|
@ -208,6 +208,13 @@ cairo_private void _cairo_beos_unlock(void*);
|
|||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
/* Size in bytes of buffer to use off the stack per functions.
|
||||
* Mostly used by text functions. For larger allocations, they'll
|
||||
* malloc(). */
|
||||
#ifndef CAIRO_STACK_BUFFER_SIZE
|
||||
#define CAIRO_STACK_BUFFER_SIZE (512 * sizeof (int))
|
||||
#endif
|
||||
|
||||
#define ASSERT_NOT_REACHED \
|
||||
do { \
|
||||
static const int NOT_REACHED = 0; \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue