[Spice-devel] [PATCH spice-common 7/8] canvas: Unify __surface_create_stride and surface_create_stride

Frediano Ziglio fziglio at redhat.com
Wed Jan 17 11:31:09 UTC 2018


They are now just the same function with same parameters,
just one calls the other.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 common/canvas_utils.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index 3e143de..a95501f 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -84,8 +84,8 @@ int spice_pixman_image_get_format(pixman_image_t *image, pixman_format_code_t *f
     return 0;
 }
 
-static inline pixman_image_t *__surface_create_stride(pixman_format_code_t format, int width, int height,
-                                                      int stride)
+pixman_image_t *surface_create_stride(pixman_format_code_t format, int width, int height,
+                                      int stride)
 {
     uint8_t *data;
     uint8_t *stride_data;
@@ -157,16 +157,10 @@ pixman_image_t * surface_create(pixman_format_code_t format, int width, int heig
             spice_error("invalid format");
         }
         stride = -stride;
-        return __surface_create_stride(format, width, height, stride);
+        return surface_create_stride(format, width, height, stride);
     }
 }
 
-pixman_image_t *surface_create_stride(pixman_format_code_t format, int width, int height,
-                                      int stride)
-{
-    return __surface_create_stride(format, width, height, stride);
-}
-
 pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data,
                                        pixman_format_code_t pixman_format, int width,
                                        int height, int gross_pixels, int top_down)
-- 
2.14.3



More information about the Spice-devel mailing list