[mutter/wip/nielsdg/cleanup-cogl-util: 2/5] cogl: Remove cogl_util_ffs macro



commit 79e22853eacfa0b106aa84441dc5f1760a50380b
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Jun 17 23:30:48 2019 +0200

    cogl: Remove cogl_util_ffs macro
    
    Since commit 46942c24, we don't need the wrapper macro as we always
    require its implementation to be available on the build system.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/629

 cogl/cogl/cogl-pipeline-layer.c                     | 2 +-
 cogl/cogl/cogl-util.h                               | 1 -
 cogl/cogl/driver/gl/cogl-texture-gl.c               | 2 +-
 cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c | 2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/cogl/cogl/cogl-pipeline-layer.c b/cogl/cogl/cogl-pipeline-layer.c
index 580f88aac..85ce34788 100644
--- a/cogl/cogl/cogl-pipeline-layer.c
+++ b/cogl/cogl/cogl-pipeline-layer.c
@@ -173,7 +173,7 @@ _cogl_pipeline_layer_copy_differences (CoglPipelineLayer *dest,
 
   while (differences)
     {
-      int index = _cogl_util_ffs (differences) - 1;
+      int index = ffs (differences) - 1;
 
       differences &= ~(1 << index);
 
diff --git a/cogl/cogl/cogl-util.h b/cogl/cogl/cogl-util.h
index 912cc893e..295800f67 100644
--- a/cogl/cogl/cogl-util.h
+++ b/cogl/cogl/cogl-util.h
@@ -114,7 +114,6 @@ unsigned int
 _cogl_util_one_at_a_time_mix (unsigned int hash);
 
 
-#define _cogl_util_ffs ffs
 #define _cogl_util_ffsl __builtin_ffsl
 
 static inline unsigned int
diff --git a/cogl/cogl/driver/gl/cogl-texture-gl.c b/cogl/cogl/driver/gl/cogl-texture-gl.c
index 17b5662fd..78ab103ad 100644
--- a/cogl/cogl/driver/gl/cogl-texture-gl.c
+++ b/cogl/cogl/driver/gl/cogl-texture-gl.c
@@ -40,7 +40,7 @@
 static inline int
 calculate_alignment (int rowstride)
 {
-  int alignment = 1 << (_cogl_util_ffs (rowstride) - 1);
+  int alignment = 1 << (ffs (rowstride) - 1);
 
   return MIN (alignment, 8);
 }
diff --git a/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c 
b/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c
index db0135dcc..b8ed95704 100644
--- a/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c
+++ b/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c
@@ -163,7 +163,7 @@ prepare_bitmap_alignment_for_upload (CoglContext *ctx,
     return cogl_object_ref (src_bmp);
 
   /* Work out the alignment of the source rowstride */
-  alignment = 1 << (_cogl_util_ffs (src_rowstride) - 1);
+  alignment = 1 << (ffs (src_rowstride) - 1);
   alignment = MIN (alignment, 8);
 
   /* If the aligned data equals the rowstride then we can upload from


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]