mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-10 19:50:23 +01: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;
|
||||
XRenderColor render_color;
|
||||
XRectangle static_xrects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
|
||||
XRectangle *xrects = static_xrects;
|
||||
int i;
|
||||
|
||||
_cairo_xlib_display_notify (surface->display);
|
||||
|
|
@ -1961,6 +1959,9 @@ _cairo_xlib_surface_fill_rectangles (void *abstract_surface,
|
|||
rects->width,
|
||||
rects->height);
|
||||
} else {
|
||||
XRectangle static_xrects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
|
||||
XRectangle *xrects = static_xrects;
|
||||
|
||||
if (num_rects > ARRAY_LENGTH (static_xrects)) {
|
||||
xrects = _cairo_malloc_ab (num_rects, sizeof (XRectangle));
|
||||
if (xrects == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue