mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 04:58:04 +02:00
[xlib] Cosmetic tweak.
Tightly scope the local rects.
This commit is contained in:
parent
06fabd6cbd
commit
23df74e5ff
1 changed files with 3 additions and 2 deletions
|
|
@ -1924,8 +1924,6 @@ _cairo_xlib_surface_fill_rectangles (void *abstract_surface,
|
||||||
{
|
{
|
||||||
cairo_xlib_surface_t *surface = abstract_surface;
|
cairo_xlib_surface_t *surface = abstract_surface;
|
||||||
XRenderColor render_color;
|
XRenderColor render_color;
|
||||||
XRectangle static_xrects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
|
|
||||||
XRectangle *xrects = static_xrects;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
_cairo_xlib_display_notify (surface->display);
|
_cairo_xlib_display_notify (surface->display);
|
||||||
|
|
@ -1961,6 +1959,9 @@ _cairo_xlib_surface_fill_rectangles (void *abstract_surface,
|
||||||
rects->width,
|
rects->width,
|
||||||
rects->height);
|
rects->height);
|
||||||
} else {
|
} else {
|
||||||
|
XRectangle static_xrects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
|
||||||
|
XRectangle *xrects = static_xrects;
|
||||||
|
|
||||||
if (num_rects > ARRAY_LENGTH (static_xrects)) {
|
if (num_rects > ARRAY_LENGTH (static_xrects)) {
|
||||||
xrects = _cairo_malloc_ab (num_rects, sizeof (XRectangle));
|
xrects = _cairo_malloc_ab (num_rects, sizeof (XRectangle));
|
||||||
if (xrects == NULL)
|
if (xrects == NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue