[Pixman] [PATCH] Fix comment about BILINEAR_INTERPOLATION_BITS to say < 8 rather than <= 8

Søren Sandmann Pedersen soren.sandmann at gmail.com
Fri Sep 19 21:55:00 PDT 2014


Since a4c79d695d52c94647b1aff7 the constant
BILINEAR_INTERPOLATION_BITS must be strictly less than 8, so fix the
comment to say this, and also add a COMPILE_TIME_ASSERT in the
bilinear fetcher in pixman-fast-path.c
---
 pixman/pixman-fast-path.c | 2 ++
 pixman/pixman-private.h   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index c6e43de..a9b7d3a 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -2343,6 +2343,8 @@ fast_fetch_bilinear_cover (pixman_iter_t *iter, const uint32_t *mask)
     int32_t dist_y;
     int i;
 
+    COMPILE_TIME_ASSERT(BILINEAR_INTERPOLATION_BITS < 8);
+
     fx = info->x;
     ux = iter->image->common.transform->matrix[0][0];
 
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index fdc966a..73108a0 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -7,7 +7,7 @@
  * The defines which are shared between C and assembly code
  */
 
-/* bilinear interpolation precision (must be <= 8) */
+/* bilinear interpolation precision (must be < 8) */
 #define BILINEAR_INTERPOLATION_BITS 7
 #define BILINEAR_INTERPOLATION_RANGE (1 << BILINEAR_INTERPOLATION_BITS)
 
-- 
1.7.11.7



More information about the Pixman mailing list