Remove useless checks for NULL before freeing
[profile/ivi/pixman.git] / pixman / pixman-general.c
index 727affc..2ccdfcd 100644 (file)
@@ -101,19 +101,9 @@ static const op_info_t op_flags[PIXMAN_N_OPERATORS] =
 
 static void
 general_composite_rect  (pixman_implementation_t *imp,
-                         pixman_op_t              op,
-                         pixman_image_t *         src,
-                         pixman_image_t *         mask,
-                         pixman_image_t *         dest,
-                         int32_t                  src_x,
-                         int32_t                  src_y,
-                         int32_t                  mask_x,
-                         int32_t                  mask_y,
-                         int32_t                  dest_x,
-                         int32_t                  dest_y,
-                         int32_t                  width,
-                         int32_t                  height)
+                         pixman_composite_info_t *info)
 {
+    PIXMAN_COMPOSITE_ARGS (info);
     uint64_t stack_scanline_buffer[(SCANLINE_BUFFER_LENGTH * 3 + 7) / 8];
     uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
@@ -124,9 +114,9 @@ general_composite_rect  (pixman_implementation_t *imp,
     int Bpp;
     int i;
 
-    if ((src->common.flags & FAST_PATH_NARROW_FORMAT)          &&
-       (!mask || mask->common.flags & FAST_PATH_NARROW_FORMAT) &&
-       (dest->common.flags & FAST_PATH_NARROW_FORMAT))
+    if ((src_image->common.flags & FAST_PATH_NARROW_FORMAT)                &&
+       (!mask_image || mask_image->common.flags & FAST_PATH_NARROW_FORMAT) &&
+       (dest_image->common.flags & FAST_PATH_NARROW_FORMAT))
     {
        narrow = ITER_NARROW;
        Bpp = 4;
@@ -152,7 +142,7 @@ general_composite_rect  (pixman_implementation_t *imp,
     /* src iter */
     src_flags = narrow | op_flags[op].src;
 
-    _pixman_implementation_src_iter_init (imp->toplevel, &src_iter, src,
+    _pixman_implementation_src_iter_init (imp->toplevel, &src_iter, src_image,
                                          src_x, src_y, width, height,
                                          src_buffer, src_flags);
 
@@ -163,24 +153,23 @@ general_composite_rect  (pixman_implementation_t *imp,
        /* If it doesn't matter what the source is, then it doesn't matter
         * what the mask is
         */
-       mask = NULL;
+       mask_image = NULL;
     }
 
     component_alpha =
-        mask                            &&
-        mask->common.type == BITS       &&
-        mask->common.component_alpha    &&
-        PIXMAN_FORMAT_RGB (mask->bits.format);
+        mask_image                           &&
+        mask_image->common.type == BITS       &&
+        mask_image->common.component_alpha    &&
+        PIXMAN_FORMAT_RGB (mask_image->bits.format);
 
     _pixman_implementation_src_iter_init (
-       imp->toplevel, &mask_iter, mask, mask_x, mask_y, width, height,
+       imp->toplevel, &mask_iter, mask_image, mask_x, mask_y, width, height,
        mask_buffer, narrow | (component_alpha? 0 : ITER_IGNORE_RGB));
 
     /* dest iter */
-    _pixman_implementation_dest_iter_init (imp->toplevel, &dest_iter, dest,
-                                          dest_x, dest_y, width, height,
-                                          dest_buffer,
-                                          narrow | op_flags[op].dst);
+    _pixman_implementation_dest_iter_init (
+       imp->toplevel, &dest_iter, dest_image, dest_x, dest_y, width, height,
+       dest_buffer, narrow | op_flags[op].dst);
 
     if (narrow)
     {
@@ -233,8 +222,8 @@ general_blt (pixman_implementation_t *imp,
              int                      dst_bpp,
              int                      src_x,
              int                      src_y,
-             int                      dst_x,
-             int                      dst_y,
+             int                      dest_x,
+             int                      dest_y,
              int                      width,
              int                      height)
 {