summaryrefslogtreecommitdiff
path: root/xserver/glamor/glamor_compositerects.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/glamor/glamor_compositerects.c')
-rw-r--r--xserver/glamor/glamor_compositerects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xserver/glamor/glamor_compositerects.c b/xserver/glamor/glamor_compositerects.c
index 3b6b2ed07..885a6c065 100644
--- a/xserver/glamor/glamor_compositerects.c
+++ b/xserver/glamor/glamor_compositerects.c
@@ -57,7 +57,7 @@ _pixman_region_init_clipped_rectangles(pixman_region16_t * region,
unsigned int i, j;
if (num_rects > ARRAY_SIZE(stack_boxes)) {
- boxes = malloc(sizeof(pixman_box16_t) * num_rects);
+ boxes = xallocarray(num_rects, sizeof(pixman_box16_t));
if (boxes == NULL)
return FALSE;
}
@@ -246,7 +246,7 @@ glamor_composite_rectangles(CARD8 op,
goto done;
}
else {
- if (_X_LIKELY(priv->type != GLAMOR_TEXTURE_LARGE)) {
+ if (_X_LIKELY(glamor_pixmap_priv_is_small(priv))) {
int error;
source = CreateSolidPicture(0, color, &error);
@@ -254,7 +254,7 @@ glamor_composite_rectangles(CARD8 op,
goto done;
if (glamor_composite_clipped_region(op, source,
NULL, dst,
- NULL, NULL, priv,
+ NULL, NULL, pixmap,
&region, 0, 0, 0, 0, 0, 0))
goto done;
}