mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-25 23:40:41 +02:00
[boilerplate] Conditionally tweak the xlib surface
Prior to introduction of the buggy members to the surface, we obviously cannot set them. However, the boilerplate code is meant to compile against older revisions of the library so we need to check for the existence prior to use.
This commit is contained in:
parent
397538a251
commit
097484da6f
2 changed files with 11 additions and 2 deletions
|
|
@ -257,9 +257,15 @@ cairo_boilerplate_xlib_surface_disable_render (cairo_surface_t *abstract_surface
|
|||
surface->base.content = CAIRO_CONTENT_COLOR;
|
||||
|
||||
/* These flags are set based on known bugs and lack of RENDER support */
|
||||
surface->buggy_repeat = TRUE;
|
||||
surface->buggy_pad_reflect = TRUE;
|
||||
#if CAIRO_XLIB_SURFACE_HAS_BUGGY_GRADIENTS
|
||||
surface->buggy_gradients = TRUE;
|
||||
#endif
|
||||
#if CAIRO_XLIB_SURFACE_HAS_BUGGY_PAD_REFLECT
|
||||
surface->buggy_pad_reflect = TRUE;
|
||||
#endif
|
||||
#if CAIRO_XLIB_SURFACE_HAS_BUGGY_REPEAT
|
||||
surface->buggy_repeat = TRUE;
|
||||
#endif
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ struct _cairo_xlib_surface {
|
|||
unsigned int buggy_gradients : 1;
|
||||
unsigned int buggy_pad_reflect : 1;
|
||||
unsigned int buggy_repeat : 1;
|
||||
#define CAIRO_XLIB_SURFACE_HAS_BUGGY_GRADIENTS 1
|
||||
#define CAIRO_XLIB_SURFACE_HAS_BUGGY_PAD_REFLECT 1
|
||||
#define CAIRO_XLIB_SURFACE_HAS_BUGGY_REPEAT 1
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue